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
[13.0][MIG]l10n_es_aeat_mod190 #1701
[13.0][MIG]l10n_es_aeat_mod190 #1701
Conversation
@manuelregidor please check this error in the test File "/home/travis/build/OCA/l10n-spain/l10n_es_aeat_mod303/tests/test_l10n_es_aeat_mod303.py", line 547, in test_model_303 |
Has podido revisarlo @manuelregidor ? |
@manuelcalerosolis @etobella Lo he revisado pero no he conseguido solucionarlo. Cuando se fuerza la llamada a _onchange_partner_id desde el método create de AccountMove del módulo del modelo del 190, fallan los tests del 303 porque se pierde el valor de partner_id de line_ids. Le he dado bastantes vueltas pero no sé cómo arreglarlo. Cualquier sugerencia será bienvenida. Muchas gracias y un saludo. |
Lo voy a mirar a ver si puedo saber q está pasando. |
@manuelregidor de momento tan solo he observado un comportamiento a mi parecer extraño.
Ahora seguiré mirando a ver si puedo ir aportar algo mas. |
@manuelcalerosolis Sí, el problema se presenta al utilizar el create de AccountMove que hereda el módulo 190. Lo que intentaré es prescindir de la función _onchange_partner_id y crear una función aislada adicional que se lance al cambiar el partner_id pero que no llame a ningún super, a ver si así funciona. |
Me decís si no conseguís nada. |
1e952aa
to
7b2ffd3
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.
Revisión funcional. ¿Qué te parece @etobella ?
@@ -72,7 +69,7 @@ def button_confirm(self): | |||
self._check_report_lines() | |||
return super(L10nEsAeatMod190Report, self).button_confirm() | |||
|
|||
@api.multi | |||
# flake8: noqa: C901 |
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.
Por que quitas el flake8?
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.
Hola @etobella, en la función compute, el flake8 indica que la función es demasiado compleja con el warning C901 (únicamente he desactivado este aviso). En los demás modelos, esta función también es muy compleja, por lo que lo he dejado así y no la he refactorizado.
7b2ffd3
to
7be2a59
Compare
@etobella ¿qué tal lo ves ahora? |
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 nobump |
On my way to merge this fine PR! |
It looks like something changed on |
Congratulations, your PR was merged at 64733e1. Thanks a lot for contributing to OCA. ❤️ |
@@ -0,0 +1,159 @@ | |||
<?xml version="1.0" encoding="UTF-8" ?> | |||
<odoo> | |||
<record id="base.state_es_vi" model="res.country.state"> |
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.
Revisando esto a posteriori, no debería existir. Es una sobrecarga no necesaria. Tenemos https://github.com/OCA/l10n-spain/blob/13.0/l10n_es_aeat/models/spanish_states_mapping.py para ello.
@manuelregidor ¿puedes revisar lo que comenta Pedro? |
supersedes #1504