Daily updates from Odoo
Thursday, December 21, 2023
1 change
Enhancements to existing features
This update fixes critical issues with tax closing in multi-company environments (such as tax units or branches). Previously, tax reports were incorrectly attached to every closing entry and postings were not synchronized, risking outdated documents and inconsistent tax lock dates. The fix ensures the main company's closing is posted last, automatically posting all sub-company closings together, with attachments only on the main closing to prevent confusion and errors.
Original PR description
When performing the tax closing in a multi-company environment (either because of a tax unit or branches), the tax report pdf (and possibly XML export, for Belgium) was added as an attachment of each…
When performing the tax closing in a multi-company environment (either because of a tax unit or branches), the tax report pdf (and possibly XML export, for Belgium) was added as an attachment of each closing entry generated. This was misleading and error-prone: the attachments only need to be on the the main company's closing. Moreover, the posting of those entries was fully decoupled: so there was no guarantee all of them will be posted at the same time, leading to the possibility that the tax lock dates are not all set at the same time, and some entries impacting the tax reports are added between the posting of each closing. In that case, right the pdf/export file was the one on the last closing posted, all the other ones were outdated. Again, this could cause confusion, and potentially cause big mistakes. To handle both those cases, we now enforce the order in which closings need to be posted: the main company needs to be the last one. Posting the main company's closing move hence posts the closing of every sub-companies directly. Then, attachments are only generated on the main closing. task-id: 3645943