Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] l10n_br_purchase: fix purchase order line form button 'save and new' #3088

Conversation

WesleyOliveira98
Copy link
Contributor

Essa PR visa resolver a Issue #3057

No formulário da purchase order line, foram adicionados 4 pages (fiscal_taxes, fiscal_line_extra_info, others e accounting) ao notebook do formulário através do módulo l10n_br_purchase, e é necessário controlar a visibilidade dessas pages para serem exibidas somente quando temos uma Operação Fiscal definida, porém os campos fiscal_taxes e fiscal_line_extra_info sempre são sobrescritos pelo módulo l10n_br_fiscal (document_fiscal_line_mixin_methods.py#L53) não permitindo adicionar o atributo invisible. Para isso, através da PR #2759, foi criado um novo notebook ao final do formulário e a visibilidade é controlada nos atributos dos notebooks. Porém no módulo web, ao clicar no botão "Save & New" nos formulários, é feita uma validação do index ativo do notebook (web/static/src/js/views/form/form_renderer.js#L267), e é nessa validação que o erro reportado na issue é disparado.

Foi identificado que isso está acontecendo pois a validação puxa o primeiro notebook no formulário, por conta disso, movemos o notebook com as pages adicionadas para antes do notebook original, e assim como o original (purchase/views/purchase_views.xml#L283), dentro da tag <group colspan="12"></group>.

cc: @marcelsavegnago @kaynnan @Matthwhy

@marcelsavegnago
Copy link
Member

é bom rodar o pre-commit run ai localmente

@WesleyOliveira98 WesleyOliveira98 force-pushed the 14.0-l10n_br_purchase-fix-order-line-save-and-new-btn branch from 7959a48 to 854600a Compare May 20, 2024 20:25
@marcelsavegnago
Copy link
Member

@kaynnan pode simular o comportamento atual e revisar funcional/tecnico a PR ?

Copy link
Contributor

@kaynnan kaynnan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[FUNCTIONAL REVIEW]

LGTM

2024-05-20_18.24.mp4

Copy link
Member

@rvalyi rvalyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rvalyi
Copy link
Member

rvalyi commented May 24, 2024

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 14.0-ocabot-merge-pr-3088-by-rvalyi-bump-minor, awaiting test results.

Copy link
Member

@marcelsavegnago marcelsavegnago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OCA-git-bot OCA-git-bot merged commit 2ecf953 into OCA:14.0 May 24, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 853f539. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants