2
0

[FIX] account_asset_management:

* multicompany error
This commit is contained in:
fromera 2020-07-30 12:05:20 +02:00 committed by Rodrigo
parent 86301ee336
commit 6d84227c16
3 changed files with 31 additions and 3 deletions

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<data noupdate="1">
<record id="account_asset_profile_multi_company_rule" model="ir.rule">
<field
name="domain_force"
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
</record>
<record id="account_asset_multi_company_rule" model="ir.rule">
<field
name="domain_force"
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
</record>
<record id="account_asset_group_multi_company_rule" model="ir.rule">
<field
name="domain_force"
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
</record>
</data>

View File

@ -0,0 +1,8 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade # pylint: disable=W7936
@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(
env.cr, "account_asset_management", "migrations/13.0.1.0.0/noupdate_changes.xml"
)

View File

@ -7,7 +7,7 @@
<field eval="True" name="global" /> <field eval="True" name="global" />
<field <field
name="domain_force" name="domain_force"
>['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field> >['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
</record> </record>
<record id="account_asset_multi_company_rule" model="ir.rule"> <record id="account_asset_multi_company_rule" model="ir.rule">
<field name="name">Account Asset multi-company</field> <field name="name">Account Asset multi-company</field>
@ -15,7 +15,7 @@
<field eval="True" name="global" /> <field eval="True" name="global" />
<field <field
name="domain_force" name="domain_force"
>['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field> >['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
</record> </record>
<record id="account_asset_group_multi_company_rule" model="ir.rule"> <record id="account_asset_group_multi_company_rule" model="ir.rule">
<field name="name">Account Asset Group multi-company</field> <field name="name">Account Asset Group multi-company</field>
@ -23,7 +23,7 @@
<field eval="True" name="global" /> <field eval="True" name="global" />
<field <field
name="domain_force" name="domain_force"
>['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field> >['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
</record> </record>
</data> </data>
</odoo> </odoo>