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_sale: Mapear o campo ind_final no Pedido de Venda #3512

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

mbcosta
Copy link
Contributor

@mbcosta mbcosta commented Nov 29, 2024

No PR #2849 acabou passando um problema ao mapear o campo ind_final e foi aberto um issue sobre isso #3449

image

image

O erro acontece porque o método que faz esse mapeamento _onchange_partner_fiscal_id no módulo l10n_br_fiscal é chamando antes do método que preenche o campo partner_invoice_id onchange_partner_id no módulo sale e com isso o método que retorna o res.partner retorna False, para resolver eu apenas inclui o _onchange_partner_fiscal_id no sale.order para chamar antes o método que preenche o partner_invoice_id, deixei um comentário para deixar claro o problema e avaliar em futuras versões se é possível resolver com menos código.

cc @OCA/local-brazil-maintainers @DiegoParadeda

@OCA-git-bot
Copy link
Contributor

Hi @renatonlima,
some modules you are maintaining are being modified, check this out!

@mbcosta
Copy link
Contributor Author

mbcosta commented Nov 29, 2024

O erro nos testes não parece ter relação com esse PR

https://github.com/OCA/l10n-brazil/actions/runs/12089606467/job/33715182259?pr=3512#step:9:377

2024-11-29 19:11:52,331 535 CRITICAL odoo odoo.modules.module: Couldn't load module l10n_br_fiscal_certificate 
2024-11-29 19:11:52,332 535 CRITICAL odoo odoo.modules.module: cannot import name 'verify' from 'OpenSSL.crypto' (unknown location) 


  File "/opt/odoo-venv/lib/python3.8/site-packages/signxml/__init__.py", line 7, in <module>
    from .verifier import XMLVerifier, VerifyResult, SignatureConfiguration
  File "/opt/odoo-venv/lib/python3.8/site-packages/signxml/verifier.py", line 13, in <module>
    from OpenSSL.crypto import verify as openssl_verify
ImportError: cannot import name 'verify' from 'OpenSSL.crypto' (unknown location)

@rvalyi
Copy link
Member

rvalyi commented Nov 29, 2024

O erro nos testes não parece ter relação com esse PR

https://github.com/OCA/l10n-brazil/actions/runs/12089606467/job/33715182259?pr=3512#step:9:377

2024-11-29 19:11:52,331 535 CRITICAL odoo odoo.modules.module: Couldn't load module l10n_br_fiscal_certificate 
2024-11-29 19:11:52,332 535 CRITICAL odoo odoo.modules.module: cannot import name 'verify' from 'OpenSSL.crypto' (unknown location) 


  File "/opt/odoo-venv/lib/python3.8/site-packages/signxml/__init__.py", line 7, in <module>
    from .verifier import XMLVerifier, VerifyResult, SignatureConfiguration
  File "/opt/odoo-venv/lib/python3.8/site-packages/signxml/verifier.py", line 13, in <module>
    from OpenSSL.crypto import verify as openssl_verify
ImportError: cannot import name 'verify' from 'OpenSSL.crypto' (unknown location)

tentei fazer um fix semelhante ao que fazemos na 15.0 e 16.0: #3513

@rvalyi
Copy link
Member

rvalyi commented Nov 29, 2024

@mbcosta deu certo, eu ja botei o fix na 14.0, se vc der um rebase em cima da 14.0 deve funcionar.

@mbcosta
Copy link
Contributor Author

mbcosta commented Nov 29, 2024

valeu @rvalyi obrigado pela solução, agora parece estar tudo certo.

Apenas para deixar claro para outros revisores que o teste desse PR é bem simples em um Novo Pedido de Venda ao selecionar um Cliente que tem a Operação de Consumo Final definida Não o campo no Pedido deve ser atualizado para esse valor.

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.

A partir da v16 vai dar para isso ser compute mas a na v14 as coisas ainda estão movidas a onchange então eu acho que a melhor forma é assim mesmo.

@rvalyi
Copy link
Member

rvalyi commented Nov 30, 2024

/ocabot merge patch

@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-3512-by-rvalyi-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit daa21f5 into OCA:14.0 Nov 30, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 3739081. 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