Merge pull request #123 from akretion/13-brexit-without-xi-support

[13.0] intrastat_base: Brexit (simple, without special code for Northern Ireland)
This commit is contained in:
Alexis de Lattre
2021-02-19 00:52:15 +01:00
committed by GitHub
3 changed files with 20 additions and 2 deletions

View File

@@ -5,7 +5,7 @@
{
"name": "Intrastat Reporting Base",
"version": "13.0.1.1.0",
"version": "13.0.1.1.1",
"category": "Intrastat",
"license": "AGPL-3",
"summary": "Base module for Intrastat reporting",

View File

@@ -64,7 +64,8 @@
<field name="intrastat" eval="True" />
</record>
<record id="base.uk" model="res.country">
<field name="intrastat" eval="True" />
<!-- Brexit means Brexit! -->
<field name="intrastat" eval="False" />
</record>
<record id="base.si" model="res.country">
<field name="intrastat" eval="True" />

View File

@@ -0,0 +1,17 @@
# 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 SUPERUSER_ID, api
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})