From 2dad3f981a6789ac53ed1aa76904c1e243ba555c Mon Sep 17 00:00:00 2001 From: fromera Date: Thu, 30 Jul 2020 12:05:20 +0200 Subject: [PATCH] [FIX] account_asset_management: * multicompany error --- .../13.0.1.0.0/noupdate_changes.xml | 20 +++++++++++++++++++ .../migrations/13.0.1.0.0/post-migration.py | 8 ++++++++ .../security/account_asset_security.xml | 6 +++--- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 account_asset_management/migrations/13.0.1.0.0/noupdate_changes.xml create mode 100644 account_asset_management/migrations/13.0.1.0.0/post-migration.py diff --git a/account_asset_management/migrations/13.0.1.0.0/noupdate_changes.xml b/account_asset_management/migrations/13.0.1.0.0/noupdate_changes.xml new file mode 100644 index 000000000..bf718c49b --- /dev/null +++ b/account_asset_management/migrations/13.0.1.0.0/noupdate_changes.xml @@ -0,0 +1,20 @@ + + + + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + + diff --git a/account_asset_management/migrations/13.0.1.0.0/post-migration.py b/account_asset_management/migrations/13.0.1.0.0/post-migration.py new file mode 100644 index 000000000..7da14b1ae --- /dev/null +++ b/account_asset_management/migrations/13.0.1.0.0/post-migration.py @@ -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" + ) \ No newline at end of file diff --git a/account_asset_management/security/account_asset_security.xml b/account_asset_management/security/account_asset_security.xml index c499e609e..33b2f92c0 100644 --- a/account_asset_management/security/account_asset_security.xml +++ b/account_asset_management/security/account_asset_security.xml @@ -7,7 +7,7 @@ ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + >['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] Account Asset multi-company @@ -15,7 +15,7 @@ ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + >['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] Account Asset Group multi-company @@ -23,7 +23,7 @@ ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + >['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]