From c4f17c69aa3da3c0825b6f0c7b0e497df02695dd Mon Sep 17 00:00:00 2001 From: oco-odoo Date: Mon, 10 May 2021 10:08:57 +0000 Subject: [PATCH] [IMP] account: tax groups tree view: allow forcing the company of the accounts in domain This was required by the introduction of tax units on enterprise. When making the closing for a tax unit, it is possible one (or more) of its companies don't have proper receivable/payable accounts configured on their tax groups. If so, a RedirectWarnings is raised pointing to this view in order to configure the groups from the company. All the companies of the unit are then active in the company selector, meaning that the record rules allow choosing accounts from any company, which is confusing and very error-prone. To solve that, we introduce a context key, used to reduce to 1 the number of companie whose accounts are considered in the domains when configuring the tax groups. closes odoo/odoo#70588 Related: odoo/upgrade#2482 Related: odoo/enterprise#18234 Signed-off-by: Laurent Smet --- addons/account/views/account_tax_views.xml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/addons/account/views/account_tax_views.xml b/addons/account/views/account_tax_views.xml index fcf94059789..82023c4a66b 100644 --- a/addons/account/views/account_tax_views.xml +++ b/addons/account/views/account_tax_views.xml @@ -213,9 +213,22 @@ - - - + + + + +