[MIG] Migrate all modules from v11 to v12

[UPD] Update intrastat_base.pot
This commit is contained in:
Alexis de Lattre
2019-05-28 19:09:32 +02:00
parent 7d2e110276
commit 9233e67012
19 changed files with 135 additions and 79 deletions

View File

@@ -5,14 +5,14 @@
{
'name': 'Intrastat Reporting Base',
'version': '11.0.1.0.0',
'version': '12.0.1.0.0',
'category': 'Intrastat',
'license': 'AGPL-3',
'summary': 'Base module for Intrastat reporting',
'author': 'Akretion,Noviat,Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/intrastat',
'depends': ['base_vat', 'account'],
'conflicts': ['report_intrastat'],
'excludes': ['account_intrastat'],
'data': [
'data/country_data.xml',
'views/product_template.xml',
@@ -25,5 +25,5 @@
'demo': [
'demo/intrastat_demo.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2011-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
Copyright 2011-2019 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).
-->
@@ -10,7 +11,7 @@
<field name="vat">FR58441019213</field>
</record>
<record id="base.res_partner_2" model="res.partner"> <!-- Agrolait -->
<record id="base.res_partner_2" model="res.partner"> <!-- Deco Addict -->
<field name="vat">BE0884025633</field>
<field name="supplier">True</field>
</record>

View File

@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
@@ -14,13 +14,13 @@ msgstr ""
"Plural-Forms: \n"
#. module: intrastat_base
#: model:ir.model.fields,help:intrastat_base.field_product_product_is_accessory_cost
#: model:ir.model.fields,help:intrastat_base.field_product_template_is_accessory_cost
#: model:ir.model.fields,help:intrastat_base.field_product_product__is_accessory_cost
#: model:ir.model.fields,help:intrastat_base.field_product_template__is_accessory_cost
msgid "Activate this option for shipping costs, packaging costs and all services related to the sale of products. This option is used for Intrastat reports."
msgstr ""
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:151
#: code:addons/intrastat_base/models/intrastat_common.py:143
#, python-format
msgid "Cannot delete the declaration %s because it is in Done state"
msgstr ""
@@ -36,134 +36,159 @@ msgid "Companies"
msgstr ""
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:39
#: code:addons/intrastat_base/models/intrastat_common.py:38
#, python-format
msgid "Company not yet set on intrastat report."
msgstr ""
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_res_config_settings
msgid "Config Settings"
msgstr ""
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_res_country
msgid "Country"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_create_uid
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view__create_uid
msgid "Created by"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_create_date
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view__create_date
msgid "Created on"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_common_display_name
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_display_name
#: model_terms:ir.ui.view,arch_db:intrastat_base.res_country_view_search
msgid "Currency"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_common__display_name
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view__display_name
msgid "Display Name"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_res_country_intrastat
#: model:ir.ui.view,arch_db:intrastat_base.res_country_view_search
#: model:ir.model.fields,field_description:intrastat_base.field_res_country__intrastat
#: model_terms:ir.ui.view,arch_db:intrastat_base.res_country_view_search
msgid "EU Country"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_account_tax_exclude_from_intrastat_if_present
#: model:ir.model.fields,field_description:intrastat_base.field_account_tax_template_exclude_from_intrastat_if_present
#: model:ir.model.fields,field_description:intrastat_base.field_account_tax__exclude_from_intrastat_if_present
#: model:ir.model.fields,field_description:intrastat_base.field_account_tax_template__exclude_from_intrastat_if_present
msgid "Exclude invoice line from intrastat if this tax is present"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_common_id
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_id
#: model_terms:ir.ui.view,arch_db:intrastat_base.res_country_view_search
msgid "Group By"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_common__id
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view__id
msgid "ID"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,help:intrastat_base.field_account_tax_exclude_from_intrastat_if_present
#: model:ir.model.fields,help:intrastat_base.field_account_tax_template_exclude_from_intrastat_if_present
#: model:ir.model.fields,help:intrastat_base.field_account_tax__exclude_from_intrastat_if_present
#: model:ir.model.fields,help:intrastat_base.field_account_tax_template__exclude_from_intrastat_if_present
msgid "If this tax is present on an invoice line, this invoice line will be skipped when generating Intrastat Product or Service lines from invoices."
msgstr ""
#. module: intrastat_base
#: model:ir.ui.menu,name:intrastat_base.menu_intrastat_base_root
#: model:ir.ui.menu,name:intrastat_base.menu_intrastat_config_root
#: model:ir.ui.view,arch_db:intrastat_base.view_intrastat_res_config_settings
#: model_terms:ir.ui.view,arch_db:intrastat_base.view_intrastat_res_config_settings
msgid "Intrastat"
msgstr ""
#. module: intrastat_base
#: model:ir.ui.view,arch_db:intrastat_base.product_template_form_view
#: model_terms:ir.ui.view,arch_db:intrastat_base.product_template_form_view
msgid "Intrastat Properties"
msgstr ""
#. module: intrastat_base
#: model:ir.ui.view,arch_db:intrastat_base.intrastat_result_view_form
#: model_terms:ir.ui.view,arch_db:intrastat_base.intrastat_result_view_form
msgid "Intrastat Result View"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_product_product_is_accessory_cost
#: model:ir.model.fields,field_description:intrastat_base.field_product_template_is_accessory_cost
#: model:ir.model.fields,field_description:intrastat_base.field_product_product__is_accessory_cost
#: model:ir.model.fields,field_description:intrastat_base.field_product_template__is_accessory_cost
msgid "Is accessory cost"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_common___last_update
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view___last_update
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_common____last_update
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view____last_update
msgid "Last Modified on"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_write_uid
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view__write_uid
msgid "Last Updated by"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_write_date
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view__write_date
msgid "Last Updated on"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,help:intrastat_base.field_res_company_intrastat_remind_user_ids
#: model:ir.model.fields,help:intrastat_base.field_res_config_settings_intrastat_remind_user_ids
#: model:ir.model.fields,help:intrastat_base.field_res_company__intrastat_remind_user_ids
#: model:ir.model.fields,help:intrastat_base.field_res_config_settings__intrastat_remind_user_ids
msgid "List of Odoo users who will receive a notification to remind them about the Intrastat declaration."
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_res_company_intrastat_email_list
#: model:ir.model.fields,field_description:intrastat_base.field_res_company__intrastat_email_list
msgid "List of emails of Users Receiving the Intrastat Reminder"
msgstr ""
#. module: intrastat_base
#: code:addons/intrastat_base/models/res_company.py:38
#: code:addons/intrastat_base/models/res_company.py:37
#, python-format
msgid "Missing e-mail address on user '%s'."
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_note
#: model_terms:ir.ui.view,arch_db:intrastat_base.res_country_view_search
msgid "Name or Code"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view__note
msgid "Notes"
msgstr ""
#. module: intrastat_base
#: model:ir.ui.view,arch_db:intrastat_base.intrastat_result_view_form
#: model_terms:ir.ui.view,arch_db:intrastat_base.intrastat_result_view_form
msgid "Ok"
msgstr ""
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_intrastat_result_view
msgid "Pop-up to show errors on intrastat report generation"
msgstr ""
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_product_template
msgid "Product Template"
msgstr ""
#. module: intrastat_base
#: model:ir.ui.view,arch_db:intrastat_base.res_country_view_search
#: model_terms:ir.ui.view,arch_db:intrastat_base.res_country_view_search
msgid "Search Countries"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,help:intrastat_base.field_res_country_intrastat
#: model:ir.model.fields,help:intrastat_base.field_res_country__intrastat
msgid "Set to True for all European Union countries."
msgstr ""
@@ -184,42 +209,44 @@ msgid "Templates for Taxes"
msgstr ""
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:52
#: code:addons/intrastat_base/models/intrastat_common.py:50
#, python-format
msgid "The VAT number is not set for the partner '%s'."
msgstr ""
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:43
#: code:addons/intrastat_base/models/intrastat_common.py:42
#, python-format
msgid "The country is not set on the company '%s'."
msgstr ""
#. module: intrastat_base
#: code:addons/intrastat_base/models/product_template.py:23
#: code:addons/intrastat_base/models/product_template.py:22
#, python-format
msgid "The option 'Is accessory cost?' should only be activated on 'Service' products. You have activated this option for the product '%s' which is of type '%s'"
msgstr ""
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:73
#: model:product.product,uom_name:intrastat_base.shipping_costs_exclude
#: model:product.template,uom_name:intrastat_base.shipping_costs_exclude_product_template
msgid "Unit(s)"
msgstr ""
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:71
#, python-format
msgid "Unknown Error"
msgstr ""
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_res_company_intrastat_remind_user_ids
#: model:ir.model.fields,field_description:intrastat_base.field_res_config_settings_intrastat_remind_user_ids
#: model:ir.model.fields,field_description:intrastat_base.field_res_company__intrastat_remind_user_ids
#: model:ir.model.fields,field_description:intrastat_base.field_res_config_settings__intrastat_remind_user_ids
msgid "Users Receiving the Intrastat Reminder"
msgstr ""
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_intrastat_result_view
msgid "intrastat.result.view"
msgstr ""
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_res_config_settings
msgid "res.config.settings"
#: model:product.product,weight_uom_name:intrastat_base.shipping_costs_exclude
#: model:product.template,weight_uom_name:intrastat_base.shipping_costs_exclude_product_template
msgid "kg"
msgstr ""

View File

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

View File

@@ -5,6 +5,7 @@
from io import BytesIO
from lxml import etree
from sys import exc_info
import base64
from traceback import format_exception
import logging
@@ -19,7 +20,6 @@ class IntrastatCommon(models.AbstractModel):
_description = "Common functions for intrastat reports for products "
"and services"
@api.multi
@api.depends('declaration_line_ids.amount_company_currency')
def _compute_numbers(self):
for this in self:
@@ -31,7 +31,6 @@ class IntrastatCommon(models.AbstractModel):
this.num_decl_lines = num_lines
this.total_amount = total_amount
@api.multi
def _check_generate_lines(self):
"""Check wether all requirements are met for generating lines."""
for this in self:
@@ -44,7 +43,6 @@ class IntrastatCommon(models.AbstractModel):
% company.name)
return True
@api.multi
def _check_generate_xml(self):
for this in self:
if not this.company_id.partner_id.vat:
@@ -76,12 +74,10 @@ class IntrastatCommon(models.AbstractModel):
logger.warning(error)
raise UserError(error)
@api.multi
def _attach_xml_file(self, xml_string, declaration_name):
'''Attach the XML file to the report_intrastat_product/service
object'''
self.ensure_one()
import base64
filename = '%s_%s.xml' % (self.year_month, declaration_name)
attach = self.env['ir.attachment'].create({
'name': filename,
@@ -91,7 +87,6 @@ class IntrastatCommon(models.AbstractModel):
'datas_fname': filename})
return attach.id
@api.multi
def _unlink_attachments(self):
atts = self.env['ir.attachment'].search(
[('res_model', '=', self._name),
@@ -114,7 +109,6 @@ class IntrastatCommon(models.AbstractModel):
}
return action
@api.multi
def _generate_xml(self):
"""
Inherit this method in the localization module
@@ -128,7 +122,6 @@ class IntrastatCommon(models.AbstractModel):
"""
return False
@api.multi
def send_reminder_email(self, mail_template_xmlid):
mail_template = self.env.ref(mail_template_xmlid)
for this in self:
@@ -143,7 +136,6 @@ class IntrastatCommon(models.AbstractModel):
'empty on company %s' % this.company_id.name)
return True
@api.multi
def unlink(self):
for intrastat in self:
if intrastat.state == 'done':
@@ -158,6 +150,7 @@ class IntrastatResultView(models.TransientModel):
Transient Model to display Intrastat Report results
"""
_name = 'intrastat.result.view'
_description = 'Pop-up to show errors on intrastat report generation'
note = fields.Text(
string='Notes', readonly=True,

View File

@@ -14,7 +14,6 @@ class ProductTemplate(models.Model):
"costs and all services related to the sale of products. "
"This option is used for Intrastat reports.")
@api.multi
@api.constrains('type', 'is_accessory_cost')
def _check_accessory_cost(self):
for this in self:

View File

@@ -1,4 +1,5 @@
# Copyright 2013-2017 Akretion (<alexis.delattre@akretion.com>)
# Copyright 2013-2017 Akretion France (http://www.akretion.com/)
# @author: <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models, _
@@ -17,7 +18,6 @@ class ResCompany(models.Model):
compute='_compute_intrastat_email_list',
string='List of emails of Users Receiving the Intrastat Reminder')
@api.multi
@api.depends(
'intrastat_remind_user_ids', 'intrastat_remind_user_ids.email')
def _compute_intrastat_email_list(self):
@@ -28,7 +28,6 @@ class ResCompany(models.Model):
emails.append(user.email)
this.intrastat_email_list = ','.join(emails)
@api.multi
@api.constrains('intrastat_remind_user_ids')
def _check_intrastat_remind_users(self):
for this in self:

View File

@@ -9,4 +9,4 @@ class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
intrastat_remind_user_ids = fields.Many2many(
related='company_id.intrastat_remind_user_ids')
related='company_id.intrastat_remind_user_ids', readonly=False)

View File

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

View File

@@ -0,0 +1,4 @@
* Alexis de Lattre, Akretion <alexis.delattre@akretion.com>
* Luc De Meyer, Noviat <info@noviat.com>
* Kumar Aberer, brain-tec AG <kumar.aberer@braintec-group.com>
* Andrea Stirpe <a.stirpe@onestein.nl>

View File

@@ -0,0 +1,11 @@
This module contains common functions for the intrastat reporting and
should be used in combination with the generic reporting module
*intrastat_product* and with the country-specific reporting modules such
as:
- *l10n_fr_intrastat_service*:
the module for the *Déclaration Européenne des Services* (DES) for France
- *l10n_fr_intrastat_product*:
the module for the *Déclaration d'Echange de Biens* (DEB) for France
- *l10n_be_intrastat_product*:
the module for the Intrastat Declaration for Belgium.

View File

@@ -0,0 +1,5 @@
WARNING:
This module conflicts with the module *account_intrastat* from Odoo Enterprise.
If you have already installed the module *account_intrastat*,
you should uninstall it first before installing this module.

View File

@@ -0,0 +1,9 @@
This module adds an intrastat property on countries and activates this property
on the countries of the European Union.
With this module, the country field on partners becomes a required field.
It adds an option *Exclude invoice line from intrastat if this tax is present*
on taxes.
It adds an *Intrastat* section on the *Invoicing* configuration page.

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2011-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
Copyright 2011-2019 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).
-->

View File

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

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2010-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
Copyright 2010-2019 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).
-->

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2013-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
© 2018 brain-tec AG (Kumar Aberer <kumar.aberer@braintec-group.com>)
Copyright 2013-2019 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>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
@@ -21,7 +22,7 @@
<div class="row">
<label for="intrastat_remind_user_ids" class="col-md-5 o_light_label"/>
<field name="intrastat_remind_user_ids" widget="many2many_tags"/>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2011-2016 Akretion (http://www.akretion.com)
Copyright 2011-2016 Akretion France (http://www.akretion.com)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
@@ -36,10 +36,14 @@
<field name="model">res.country</field>
<field name="arch" type="xml">
<search string="Search Countries">
<field name="name" />
<field name="name" filter_domain="['|', ('name', 'ilike', self), ('code', '=', self)]" string="Name or Code"/>
<field name="code" />
<field name="currency_id"/>
<filter name="intrastat" string="EU Country"
domain="[('intrastat', '=', True)]" />
domain="[('intrastat', '=', True)]" />
<group string="Group By" name="groupby">
<filter name="currency_groupby" string="Currency" context="{'group_by': 'currency_id'}"/>
</group>
</search>
</field>
</record>

View File

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