[FIX] account: fix ir.rule on tax repartition lines

Before this commit, you could search `account.tax.repartition.line`
and get records from all the existing companies,
which is not supposed to happen.

It should only return records of the `active_company_ids`.

That was because there were no `ir.rule` preventing that.
This fixes the issue.

closes odoo/odoo#115973

X-original-commit: 3e850ba9e27ac487d1f300f3ffc4ed2578e76f2f
Related: odoo/enterprise#38472
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
This commit is contained in:
John Laterre (jol)
2023-03-21 12:38:56 +01:00
parent 4d71ae5a13
commit 7e21edf89b
@@ -151,6 +151,12 @@
<field name="domain_force">[('company_id', 'in', company_ids)]</field>
</record>
<record id="tax_rep_comp_rule" model="ir.rule">
<field name="name">Tax Repartition multi-company</field>
<field name="model_id" ref="model_account_tax_repartition_line"/>
<field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
</record>
<record id="invoice_analysis_comp_rule" model="ir.rule">
<field name="name">Invoice Analysis multi-company</field>
<field name="model_id" ref="model_account_invoice_report"/>