mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
intrastat_base: Brexit
intrastat = False on UK, with update via mig script
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
{
|
||||
'name': 'Intrastat Reporting Base',
|
||||
'version': '10.0.1.1.0',
|
||||
'version': '10.0.1.2.0',
|
||||
'category': 'Intrastat',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Base module for Intrastat reporting',
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<field name="intrastat" eval="True"/>
|
||||
</record>
|
||||
<record id="base.uk" model="res.country">
|
||||
<field name="intrastat" eval="True"/>
|
||||
<field name="intrastat" eval="False"/> <!-- Brexit means Brexit! -->
|
||||
</record>
|
||||
<record id="base.si" model="res.country">
|
||||
<field name="intrastat" eval="True"/>
|
||||
|
||||
18
intrastat_base/migrations/10.0.1.2.0/post-migration.py
Normal file
18
intrastat_base/migrations/10.0.1.2.0/post-migration.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2021 Akretion France (http://www.akretion.com/)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, SUPERUSER_ID
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
if not version:
|
||||
return
|
||||
|
||||
with api.Environment.manage():
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
uk_country = env.ref('base.uk')
|
||||
# Brexit... bye bye, we'll miss you guys!
|
||||
if uk_country.intrastat:
|
||||
uk_country.write({'intrastat': False})
|
||||
Reference in New Issue
Block a user