Thursday, August 15, 2024
1 change
Enhancements to existing features
Accounting accounts can now be shared between companies while still showing the correct company-specific account code in reports and searches. This reduces duplicated setup for multi-company organizations and improves consistency across accounting, consolidation, assets, payments, and reporting workflows.
Original PR description
- `account.code` is now a computed (company-dependent) field. Therefore, when searching for a code in a company that is different from the active company, one must use `with_company(company)`. - To use `account.code` in accounting reports, we need to modify `env['account.report']._get_sql_table_expression()` so that it returns a `Query` rather than a `tuple[SQL, SQL]`, so that we can use `env['account.account']._field_to_sql()` to add a join on `ir_property` to the query. - we remove uses of `self = self.with_context(lang=...)` when handling the translation of `account.name` since this is already handled by `_field_to_sql`. Community PR: https://github.com/odoo/odoo/pull/171079 Upgrade PR: https://github.com/odoo/upgrade/pull/6372 taskid: 3698780