Skip to content

Commit

Permalink
Merge PR #286 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 6, 2024
2 parents f9ce5be + dbd3d90 commit fdd7933
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
2 changes: 1 addition & 1 deletion intrastat_product/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 12 additions & 0 deletions intrastat_product/migrations/17.0.1.1.0/noupdate_changes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="intrastat_transaction_company_rule" model="ir.rule">
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="intrastat_region_company_rule" model="ir.rule">
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="intrastat_product_declaration_company_rule" model="ir.rule">
<field name="domain_force">[('company_id', 'in', company_ids)]</field>
</record>
</odoo>
10 changes: 10 additions & 0 deletions intrastat_product/migrations/17.0.1.1.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -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"
)
18 changes: 15 additions & 3 deletions intrastat_product/security/intrastat_security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,33 @@
<field name="model_id" ref="model_intrastat_transaction" />
<field
name="domain_force"
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
>[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="intrastat_region_company_rule" model="ir.rule">
<field name="name">Intrastat Region Company rule</field>
<field name="model_id" ref="model_intrastat_region" />
<field
name="domain_force"
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
>[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="intrastat_product_computation_line_company_rule" model="ir.rule">
<field name="name">Intrastat Product Computation Lines Company rule</field>
<field name="model_id" ref="model_intrastat_product_computation_line" />
<field
name="domain_force"
>[('parent_id.company_id', 'in', company_ids)]</field>
</record>
<record id="intrastat_product_declaration_company_rule" model="ir.rule">
<field name="name">Intrastat Product Declaration Company rule</field>
<field name="model_id" ref="model_intrastat_product_declaration" />
<field name="domain_force">[('company_id', 'in', company_ids)]</field>
</record>
<record id="intrastat_product_declaration_line_company_rule" model="ir.rule">
<field name="name">Intrastat Product Declaration Lines Company rule</field>
<field name="model_id" ref="model_intrastat_product_declaration_line" />
<field
name="domain_force"
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
>[('parent_id.company_id', 'in', company_ids)]</field>
</record>
</data>
</odoo>

0 comments on commit fdd7933

Please sign in to comment.