-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
[12.0][FIX] fiscal document return #960
[12.0][FIX] fiscal document return #960
Conversation
renatonlima
commented
Sep 17, 2020
- Não deve chamar o onchange do product_id na linha ao fazer as linhas de devolução (porque deve pegar os dados fiscais exatamente como da nota original);
- O _create_return espera vários registros, mas é chamdo pelo método action_create_return tem um ensure_one();
- Implementado uma validação caso a operação fiscal não tenha a operação de retorno definida
- Não deveria gravar a operação fiscal do cabeçalho da NF-e em todas as linhas, pois cada linha pode ter operações fiscais diferentes e consequentemente operações fiscais de retorno diferentes.
4b73f2c
to
edaface
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small English fixes.
l10n_br_fiscal/models/document.py
Outdated
fsc_op = record.fiscal_operation_id.return_fiscal_operation_id | ||
if not fsc_op: | ||
raise ValidationError(_( | ||
"The fiscal operation {} there is not Return Fiscal " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The fiscal operation {} there is not Return Fiscal " | |
"The Fiscal Operation {} there has no Return Fiscal " |
edaface
to
d0bc21a
Compare
d0bc21a
to
b642481
Compare
The Travis error was unrelated, it was due to a currency server connnection failure. I restarted the build to ensure it's green. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realmente ta quebrando o teste do return https://travis-ci.org/github/OCA/l10n-brazil/jobs/728192636#L1912
cc @renatonlima
0624d9c
to
98926f4
Compare
l10n_br_fiscal/models/document.py
Outdated
if not fsc_op: | ||
raise ValidationError(_( | ||
"The fiscal operation {} has no Return Fiscal " | ||
"Operation definied".format(record.fiscal_operation_id))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definied -> defined
also be consistent if you use cap letters for Fiscal Operation or not in the same sentence (Odoo uses to do it but not mandatory).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definied -> defined
also be consistent if you use cap letters for Fiscal Operation or not in the same sentence (Odoo uses to do it but not mandatory).
l10n_br_fiscal/models/document.py
Outdated
if not fsc_op_line: | ||
raise ValidationError(_( | ||
"The fiscal operation {} has no Return Fiscal " | ||
"Operation definied".format(l.fiscal_operation_id))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definied -> defined
also be consistent if you use cap letters for Fiscal Operation or not in the same sentence (Odoo uses to do it but not mandatory).
98926f4
to
b8f8b16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR has the |
/ocabot merge minor |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 37aa56b. Thanks a lot for contributing to OCA. ❤️ |