2
0
account-financial-tools/account_asset_management/migrations/13.0.1.1.3/post-migration.py
fromera 71006a184e [FIX] version
[FIX] new line

[FIX] new line

[FIX] without openupgrade

[FIX] without openupgrade

[FIX] without openupgrade

[FIX] without openupgrade

[FIX] without openupgrade
2022-12-24 00:42:21 +01:00

28 lines
945 B
Python

# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def migrate(cr, version):
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
domain = "['|',('company_id','=',False),('company_id','in',company_ids)]"
rule = env.ref(
"account_asset_management.account_asset_profile_multi_company_rule",
raise_if_not_found=False,
)
if rule:
rule.write({"domain_force": domain})
rule = env.ref(
"account_asset_management.account_asset_multi_company_rule",
raise_if_not_found=False,
)
if rule:
rule.write({"domain_force": domain})
rule = env.ref(
"account_asset_management.account_asset_group_multi_company_rule",
raise_if_not_found=False,
)
if rule:
rule.write({"domain_force": domain})