[IMP] account: add company ir.rule for tax group

This commit aims to improve consistency.

Context:
- functionally:
    `account.tax.group` is company dependent and thus, it's weird to be able
    to access to other company tax group when those companies aren't
    selected.

- technically:
    In accounting apps, devs also expect company dependent field to not be
    retrieved by the `search` method and not having that ir.rule could cause
    bugs.

X-original-commit: 56f039f82afcf6c262bc5711cd28ae691cdf00e2
Part-of: odoo/odoo#125950
This commit is contained in:
Brice bib Bartoletti
2023-06-21 20:10:28 +02:00
parent bea3bb541a
commit b8a00bf9d4
@@ -152,6 +152,12 @@
<field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
</record>
<record id="tax_group_comp_rule" model="ir.rule">
<field name="name">Tax group multi-company</field>
<field name="model_id" ref="model_account_tax_group"/>
<field name="domain_force">[('company_id', 'in', company_ids)]</field>
</record>
<record id="tax_comp_rule" model="ir.rule">
<field name="name">Tax multi-company</field>
<field name="model_id" ref="model_account_tax"/>