[MIG] intrastat_base from v13 to v14

Up-port PR #98
This commit is contained in:
Alexis de Lattre
2020-10-14 22:19:30 +02:00
parent 821fd1f3a8
commit b03b74ad7b
16 changed files with 35 additions and 31 deletions

View File

@@ -1,11 +1,11 @@
# Copyright 2011-2016 Akretion (http://www.akretion.com)
# Copyright 2018 brain-tec AG (Kumar Aberer <kumar.aberer@braintec-group.com>)
# Copyright 2011-2020 Akretion (http://www.akretion.com)
# Copyright 2018-2020 brain-tec AG (Kumar Aberer <kumar.aberer@braintec-group.com>)
# Copyright 2009-2020 Noviat (http://www.noviat.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Intrastat Reporting Base",
"version": "13.0.1.1.0",
"version": "14.0.1.0.0",
"category": "Intrastat",
"license": "AGPL-3",
"summary": "Base module for Intrastat reporting",
@@ -14,6 +14,7 @@
"depends": ["base_vat", "account"],
"excludes": ["account_intrastat"],
"data": [
"security/ir.model.access.csv",
"data/country_data.xml",
"views/product_template.xml",
"views/res_partner.xml",

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2011-2019 Akretion France (http://www.akretion.com/)
Copyright 2011-2020 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).
-->
@@ -18,6 +18,6 @@
<field name="type">service</field>
<field name="categ_id" ref="product.product_category_all" />
<field name="list_price">30</field>
<field name="is_accessory_cost">True</field>
<field name="is_accessory_cost" eval="True" />
</record>
</odoo>

View File

@@ -1,4 +1,4 @@
# Copyright 2011-2019 Akretion France (http://www.akretion.com).
# Copyright 2011-2020 Akretion France (http://www.akretion.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models

View File

@@ -1,5 +1,5 @@
# Copyright 2010-2016 Akretion (<alexis.delattre@akretion.com>)
# Copyright 2009-2019 Noviat (http://www.noviat.com)
# Copyright 2010-2020 Akretion (<alexis.delattre@akretion.com>)
# Copyright 2009-2020 Noviat (http://www.noviat.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import base64
@@ -102,7 +102,6 @@ class IntrastatCommon(models.AbstractModel):
corresponding attachement"""
action = {
"name": title,
"view_type": "form",
"view_mode": "form",
"res_model": "ir.attachment",
"type": "ir.actions.act_window",

View File

@@ -1,4 +1,4 @@
# Copyright 2010-2016 Akretion (<alexis.delattre@akretion.com>)
# Copyright 2010-2020 Akretion (<alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
@@ -26,5 +26,5 @@ class ProductTemplate(models.Model):
"this option for the product '%s' which is of type "
"'%s'"
)
% (this.name, this.type)
% (this.display_name, this.type)
)

View File

@@ -1,4 +1,4 @@
# Copyright 2013-2017 Akretion France (http://www.akretion.com/)
# Copyright 2013-2020 Akretion France (http://www.akretion.com/)
# @author: <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@@ -10,7 +10,8 @@ class ResCompany(models.Model):
_inherit = "res.company"
intrastat_remind_user_ids = fields.Many2many(
"res.users",
comodel_name="res.users",
relation="company_intrastat_reminder_user_rel",
column1="company_id",
column2="user_id",
string="Users Receiving the Intrastat Reminder",

View File

@@ -1,5 +1,6 @@
# Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018 brain-tec AG (Kumar Aberer <kumar.aberer@braintec-group.com>)
# Copyright 2017-2020 Akretion France (http://www.akretion.com/)
# Copyright 2018-2020 brain-tec AG (Kumar Aberer <kumar.aberer@braintec-group.com>)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models

View File

@@ -1,4 +1,4 @@
# Copyright 2011-2019 Akretion France (http://www.akretion.com/)
# Copyright 2011-2020 Akretion France (http://www.akretion.com/)
# @author: <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

View File

@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_intrastat_result_view,Access on intrastat.result.view,model_intrastat_result_view,account.group_account_user,1,1,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_intrastat_result_view Access on intrastat.result.view model_intrastat_result_view account.group_account_user 1 1 1 0

View File

@@ -17,4 +17,4 @@ class TestIntrastatBase(TransactionCase):
demo_company = self.env.ref("base.main_company")
demo_company.write({"intrastat_remind_user_ids": [(6, False, [demo_user.id])]})
# then check if intrastat_email_list contains the email of the user
self.assertEquals(demo_company.intrastat_email_list, demo_user.email)
self.assertEqual(demo_company.intrastat_email_list, demo_user.email)

View File

@@ -1,19 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2011-2019 Akretion France (http://www.akretion.com/)
Copyright 2011-2020 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).
-->
<odoo>
<!-- Add 'exclude_from_intrastat_if_present' on tax form view -->
<record id="view_tax_form" model="ir.ui.view">
<field name="name">intrastat.base.tax</field>
<field name="model">account.tax</field>
<field name="inherit_id" ref="account.view_tax_form" />
<field name="arch" type="xml">
<field name="active" position="before">
<group name="advanced_booleans" position="inside">
<field name="exclude_from_intrastat_if_present" />
</field>
</group>
</field>
</record>
</odoo>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2011-2016 Akretion France (http://www.akretion.com/)
Copyright 2015-2016 Noviat (http://www.noviat.com/)
Copyright 2011-2020 Akretion France (http://www.akretion.com/)
Copyright 2015-2020 Noviat (http://www.noviat.com/)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
@@ -27,7 +27,7 @@
<field name="note" nolabel="1" />
</group>
<footer>
<button string="Ok" class="oe_highlight" special="cancel" />
<button string="Ok" class="btn-primary" special="cancel" />
</footer>
</form>
</field>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2010-2019 Akretion France (http://www.akretion.com/)
Copyright 2010-2020 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).
-->
@@ -11,7 +11,7 @@
<field name="inherit_id" ref="account.product_template_form_view" />
<field name="arch" type="xml">
<group name="properties" position="after">
<group string="Intrastat Properties" name="intrastat">
<group string="Intrastat" name="intrastat">
<!-- If you need this field, inherit this view in a
localisation module to set invisible="0" -->
<field

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2013-2019 Akretion France (http://www.akretion.com/)
Copyright 2013-2020 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
Copyright 2018 brain-tec AG (Kumar Aberer <kumar.aberer@braintec-group.com>)
Copyright 2018-2020 brain-tec AG (Kumar Aberer <kumar.aberer@braintec-group.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2011-2016 Akretion France (http://www.akretion.com)
Copyright 2011-2020 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).
-->
<odoo>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2010-2019 Akretion France (http://www.akretion.com/)
Copyright 2010-2020 Akretion France (http://www.akretion.com/)
@author David BEAL <david.beal@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->