Daily updates from Odoo
Monday, May 14, 2018
1 change
Resolved issues and error corrections
This fix updates Mexican e-invoicing tests so invoices and related refunds consistently use refreshed data. It reduces inconsistent test outcomes caused by cached information when records are created under different users.
Original PR description
Since invoices are created in the tests using a different user, they get its own new environment. Moreover, since they are under a test class, the cache is not automatically invalidated. Because of the above, when an invoice is created and a refund is created for that invoice, the invoice's values and the refund's values related to that invoice may differ, leading to inconsistencies depending on which one the information is retrieved from. This change ensures the cache for the refund to be refreshed before any operation is done, to ensure both the invoice and the refund refers to the same information.