mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
Add migration script for ir.rule
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
{
|
||||
"name": "Intrastat Product",
|
||||
"version": "13.0.1.0.2",
|
||||
"version": "13.0.1.0.3",
|
||||
"category": "Intrastat",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Base module for Intrastat Product",
|
||||
|
||||
18
intrastat_product/migrations/13.0.1.0.3/noupdate_changes.xml
Normal file
18
intrastat_product/migrations/13.0.1.0.3/noupdate_changes.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="intrastat_transaction_company_rule" model="ir.rule">
|
||||
<field
|
||||
name="domain_force"
|
||||
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
<record id="intrastat_region_company_rule" model="ir.rule">
|
||||
<field
|
||||
name="domain_force"
|
||||
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
<record id="intrastat_product_declaration_company_rule" model="ir.rule">
|
||||
<field
|
||||
name="domain_force"
|
||||
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
</odoo>
|
||||
10
intrastat_product/migrations/13.0.1.0.3/post-migration.py
Normal file
10
intrastat_product/migrations/13.0.1.0.3/post-migration.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openupgradelib import openupgrade # pylint: disable=W7936
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
openupgrade.load_data(
|
||||
env.cr, "intrastat_product", "migrations/13.0.1.0.3/noupdate_changes.xml"
|
||||
)
|
||||
Reference in New Issue
Block a user