Sunday, November 5, 2023
1 change · 17.0
Resolved issues and error corrections
This update fixes how financial reports handle company branches when multi-company filtering is disabled or set to tax units. Previously, invoices and transactions from selected branches were not appearing in reports like Aged Receivable. The fix ensures that when you select a company and its branches, all their financial data is properly included in the reports. Additionally, export buttons now display as disabled (rather than hidden) when incomplete branch selections would create invalid exports, and tax closing entries are now correctly assigned to their respective branches.
Original PR description
Example of the issue: 1) Create a company called "main" 2) Create a branch for "main" called "branch" 3) Make an invoice in "main" 4) Make an invoice in "branch" 5) Modify the Aged Receivable report, and set filter_multi_company to 'disabled' 6) Select "main" as current company. By default, "branch" is selected as well, keep it like this. 7) Open the Aged Receivable ====> You only see the invoice made for "main", not the one in "branch". While totally correct in a regular multi-company setup, this is not the behavior we want when those companies contain branches. When filter_multi_company only accepts the active company (so, when it's 'disabled' or set to 'tax_units' and no tax unit is selected), we also want to include all of its branches that are currently selected in the company selector. Forward-Port-Of: odoo/enterprise#49224