diff --git a/intrastat_product/__manifest__.py b/intrastat_product/__manifest__.py index 6b2c97f..a94c52a 100644 --- a/intrastat_product/__manifest__.py +++ b/intrastat_product/__manifest__.py @@ -7,7 +7,7 @@ { "name": "Intrastat Product", - "version": "17.0.1.0.1", + "version": "17.0.1.1.0", "category": "Intrastat", "license": "AGPL-3", "summary": "Base module for Intrastat Product", diff --git a/intrastat_product/migrations/17.0.1.1.0/noupdate_changes.xml b/intrastat_product/migrations/17.0.1.1.0/noupdate_changes.xml new file mode 100644 index 0000000..d26b8df --- /dev/null +++ b/intrastat_product/migrations/17.0.1.1.0/noupdate_changes.xml @@ -0,0 +1,12 @@ + + + + [('company_id', 'in', company_ids + [False])] + + + [('company_id', 'in', company_ids + [False])] + + + [('company_id', 'in', company_ids)] + + diff --git a/intrastat_product/migrations/17.0.1.1.0/post-migration.py b/intrastat_product/migrations/17.0.1.1.0/post-migration.py new file mode 100644 index 0000000..a4a274b --- /dev/null +++ b/intrastat_product/migrations/17.0.1.1.0/post-migration.py @@ -0,0 +1,10 @@ +# Copyright 2024 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data( + env.cr, "intrastat_product", "migrations/17.0.1.1.0/noupdate_changes.xml" + ) diff --git a/intrastat_product/security/intrastat_security.xml b/intrastat_product/security/intrastat_security.xml index 82552a5..27265fa 100644 --- a/intrastat_product/security/intrastat_security.xml +++ b/intrastat_product/security/intrastat_security.xml @@ -15,21 +15,33 @@ ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + >[('company_id', 'in', company_ids + [False])] Intrastat Region Company rule ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + >[('company_id', 'in', company_ids + [False])] + + + Intrastat Product Computation Lines Company rule + + [('parent_id.company_id', 'in', company_ids)] Intrastat Product Declaration Company rule + [('company_id', 'in', company_ids)] + + + Intrastat Product Declaration Lines Company rule + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + >[('parent_id.company_id', 'in', company_ids)]