-
-
Notifications
You must be signed in to change notification settings - Fork 526
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
[16.0][MIG] l10n_es_aeat_sii_oss: Migration to 16.0 #3112
[16.0][MIG] l10n_es_aeat_sii_oss: Migration to 16.0 #3112
Conversation
d8d496c
to
14ee322
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.
Code review
LGTM. |
/ocabot migration l10n_es_aeat_sii_oss |
Está aún como draft y |
Buenos días @pedrobaeza Vamos a realizar algunas pruebas funcionales más. En cuanto las hayamos pasado, quito las etiquetas y aviso por aquí. Muchas gracias! |
Tras varias pruebas funcionales, marcamos como listo. |
@@ -35,6 +35,7 @@ def setUpClass(cls): | |||
|
|||
def test_invoice_sii_oss(self): | |||
self.partner.sii_simplified_invoice = True | |||
self.env.clear() |
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.
No tengo claro por qué necesitáis hacer esto. Puede estar tapando un problema en otro lado.
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.
Aquí @pedrobaeza estuvimos viendo que si no borrábamos la cache estaba intentando crear X registros nuevos (NewID) y nos saltaba error al hacer el sorted del metodo _compute_name.
Es posible que haya un problema con el Form y que no este borrando la cache o que este manteniendo registros en cache que no tendría que darse, pero no hemos dado con ello.
Sabes si a alguien le ha pasado esto en los test con el Form, ya que también cambiamos el Form por un create del registro y el test paso bien.
Un saludo
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.
Ahora las facturas ya no se deberían crear con Form
en v16. Se volvió a tocar para que con los mínimos vals
, fuera creable desde código. Echa un vistazo a este método y si acaso, cambiad el código para utilizarlo de forma similar:
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.
Buenos días.
He modificado el test para hacerlo con create
directamente. El test no era hijo de AccountTestInvoicingCommon
por eso al final he hecho el create
directamente. El número de líneas es mayor que cuando se hacía con Form
pero no es nada significativo.
- Standard procedure - Conversion from account.invoice to account.move - Test adaptation TT31556
Steps to reproduce: - Have partner 1 with fiscal position FP1 with registration key 01. - Have partner 2 with fiscal position FP2 with registration key 02. - Create customer invoice with partner 1 as customer. - Select partner 2 as delivery address. Expected result: Fiscal position is changed to FP2 and the registration key is changed to 02. Current behavior: The fiscal position is changed, but not the registration key. That's because the recursive onchanges are explicitly disabled in account move object: https://github.com/odoo/odoo/blob/2f817a7b36cc7e5ab235829eecd61a1d71ce546e/addons/account/models/account_move.py#L1190 We workaround this limitation converting the registration key into a computed writable field that is computed even if the recursive onchange is disabled.
14ee322
to
f341fae
Compare
} | ||
invoice = ( | ||
self.env["account.move"] | ||
.with_context(default_move_type="out_invoice") |
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.
Sigue haciendo falta pasar este contexto?
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.
Lo he metido porque en el _create_invoice
:
- Primero lo mete en el invoice_vals: https://github.com/odoo/odoo/blob/f73c214efdbd49865ff3f0db915fadc80b4403b0/addons/account/tests/common.py#L678
- Y luego lo vuelve a meter en el contexto: https://github.com/odoo/odoo/blob/f73c214efdbd49865ff3f0db915fadc80b4403b0/addons/account/tests/common.py#L696
A mí tampoco me parece necesario, pero como lo meten ahí, por hacerlo de manera similar. Si me dices de quitarlo, lo quito.
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.
Creo que ahí lo han hecho por el "por si acaso". Prueba a quitarlo a ver si sigue todo verde.
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.
Hecho!
f341fae
to
3b66181
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.
/ocabot merge nobump
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 71fab8d. Thanks a lot for contributing to OCA. ❤️ |
#2526