[MIG] intrastat_base to v15

This commit is contained in:
Alexis de Lattre
2021-12-16 16:43:46 +01:00
parent e5f382a82d
commit f99e557058
16 changed files with 45 additions and 28 deletions

View File

@@ -1,15 +1,16 @@
# Copyright 2011-2020 Akretion (http://www.akretion.com) # Copyright 2011-2021 Akretion (http://www.akretion.com)
# Copyright 2018-2020 brain-tec AG (Kumar Aberer <kumar.aberer@braintec-group.com>) # Copyright 2018-2021 brain-tec AG (Kumar Aberer <kumar.aberer@braintec-group.com>)
# Copyright 2009-2020 Noviat (http://www.noviat.com) # Copyright 2009-2021 Noviat (http://www.noviat.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{ {
"name": "Intrastat Reporting Base", "name": "Intrastat Reporting Base",
"version": "14.0.2.0.0", "version": "15.0.1.0.0",
"category": "Intrastat", "category": "Intrastat",
"license": "AGPL-3", "license": "AGPL-3",
"summary": "Base module for Intrastat reporting", "summary": "Base module for Intrastat reporting",
"author": "ACSONE SA/NV, Akretion,Noviat,Odoo Community Association (OCA)", "author": "ACSONE SA/NV, Akretion,Noviat,Odoo Community Association (OCA)",
"maintainers": ["alexis-via", "luc-demeyer"],
"website": "https://github.com/OCA/intrastat-extrastat", "website": "https://github.com/OCA/intrastat-extrastat",
"depends": ["base_vat", "account"], "depends": ["base_vat", "account"],
"excludes": ["account_intrastat"], "excludes": ["account_intrastat"],

View File

@@ -1,10 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<!-- <!--
Copyright 2011-2020 Akretion France (http://www.akretion.com/) Copyright 2011-2021 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com> @author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
--> -->
<odoo noupdate="1"> <odoo noupdate="1">
<record id="base.main_company" model="res.company">
<field
name="intrastat_remind_user_ids"
eval="[(4, ref('base.user_demo')), (4, ref('base.user_admin'))]"
/>
</record>
<record id="base.main_partner" model="res.partner"> <record id="base.main_partner" model="res.partner">
<field name="vat">FR58441019213</field> <field name="vat">FR58441019213</field>
</record> </record>

View File

@@ -1,6 +1,7 @@
# Copyright 2020 Akretion France (http://www.akretion.com/) # Copyright 2020-2021 Akretion France (http://www.akretion.com/)
# @author: <alexis.delattre@akretion.com> # @author: <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models from odoo import models

View File

@@ -1,4 +1,4 @@
# Copyright 2020 Akretion France (http://www.akretion.com/) # Copyright 2020-2021 Akretion France (http://www.akretion.com/)
# @author: <alexis.delattre@akretion.com> # @author: <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@@ -9,7 +9,6 @@ class AccountFiscalPosition(models.Model):
_inherit = "account.fiscal.position" _inherit = "account.fiscal.position"
intrastat = fields.Boolean( intrastat = fields.Boolean(
string="Intrastat",
help="Set to True if the invoices with this fiscal position should " help="Set to True if the invoices with this fiscal position should "
"be taken into account for the generation of the intrastat reports.", "be taken into account for the generation of the intrastat reports.",
) )

View File

@@ -8,7 +8,6 @@ class AccountFiscalPositionTemplate(models.Model):
_inherit = "account.fiscal.position.template" _inherit = "account.fiscal.position.template"
intrastat = fields.Boolean( intrastat = fields.Boolean(
string="Intrastat",
help="Check this if you want to generate intrastat declarations with" help="Check this if you want to generate intrastat declarations with"
"the created fiscal position", "the created fiscal position",
) )

View File

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

View File

@@ -1,4 +1,5 @@
# Copyright 2010-2020 Akretion (<alexis.delattre@akretion.com>) # Copyright 2010-2021 Akretion France (http://www.akretion.com/)
# @author: <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models from odoo import _, api, fields, models
@@ -9,7 +10,6 @@ class ProductTemplate(models.Model):
_inherit = "product.template" _inherit = "product.template"
is_accessory_cost = fields.Boolean( is_accessory_cost = fields.Boolean(
string="Is accessory cost",
help="Activate this option for shipping costs, packaging " help="Activate this option for shipping costs, packaging "
"costs and all services related to the sale of products. " "costs and all services related to the sale of products. "
"This option is used for Intrastat reports.", "This option is used for Intrastat reports.",
@@ -23,8 +23,12 @@ class ProductTemplate(models.Model):
_( _(
"The option 'Is accessory cost?' should only be " "The option 'Is accessory cost?' should only be "
"activated on 'Service' products. You have activated " "activated on 'Service' products. You have activated "
"this option for the product '%s' which is of type " "this option for the product '{product_name}' which is "
"'%s'" "configured with type '{product_type}'."
).format(
product_name=this.display_name,
product_type=this._fields["type"].convert_to_export(
this.type, this
),
) )
% (this.display_name, this.type)
) )

View File

@@ -1,4 +1,4 @@
# Copyright 2013-2020 Akretion France (http://www.akretion.com/) # Copyright 2013-2021 Akretion France (http://www.akretion.com/)
# @author: <alexis.delattre@akretion.com> # @author: <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@@ -63,10 +63,10 @@ class ResCompany(models.Model):
logger.warning(xml_bytes) logger.warning(xml_bytes)
logger.warning(e) logger.warning(e)
usererror = "{}\n\n{}".format(e.__class__.__name__, str(e)) usererror = "{}\n\n{}".format(e.__class__.__name__, str(e))
raise UserError(usererror) raise UserError(usererror) from e
except Exception: except Exception as e:
error = _("Unknown Error") error = _("Unknown Error")
tb = "".join(format_exception(*exc_info())) tb = "".join(format_exception(*exc_info()))
error += "\n%s" % tb error += "\n%s" % tb
logger.warning(error) logger.warning(error)
raise UserError(error) raise UserError(error) from e

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<!-- <!--
Copyright 2020 Akretion France (https://akretion.com/) Copyright 2020-2021 Akretion France (https://akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com> @author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
--> -->

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<!-- <!--
Copyright 2011-2020 Akretion France (http://www.akretion.com/) Copyright 2011-2021 Akretion France (http://www.akretion.com/)
Copyright 2015-2020 Noviat (http://www.noviat.com/) Copyright 2015-2021 Noviat (http://www.noviat.com/)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
--> -->
<odoo> <odoo>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<!-- <!--
Copyright 2010-2020 Akretion France (http://www.akretion.com/) Copyright 2010-2021 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com> @author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
--> -->

View File

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

View File

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

View File

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

View File

@@ -0,0 +1 @@
../../../../intrastat_base

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)