diff --git a/intrastat_base/README.rst b/intrastat_base/README.rst index 09a4328..2dece29 100644 --- a/intrastat_base/README.rst +++ b/intrastat_base/README.rst @@ -1,4 +1,4 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 @@ -43,7 +43,7 @@ It adds a tab *Intrastat* on the company form view. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/227/10.0 + :target: https://runbot.odoo-community.org/runbot/227/11.0 Bug Tracker =========== diff --git a/intrastat_base/__init__.py b/intrastat_base/__init__.py index a0fdc10..0650744 100644 --- a/intrastat_base/__init__.py +++ b/intrastat_base/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- from . import models diff --git a/intrastat_base/__manifest__.py b/intrastat_base/__manifest__.py index ba5a0f1..d584ab2 100644 --- a/intrastat_base/__manifest__.py +++ b/intrastat_base/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2011-2016 Akretion (http://www.akretion.com) # © 2018 brain-tec AG (Kumar Aberer ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -9,8 +8,8 @@ 'category': 'Intrastat', 'license': 'AGPL-3', 'summary': 'Base module for Intrastat reporting', - 'author': 'Akretion,Odoo Community Association (OCA), brain-tec AG', - 'website': 'http://www.akretion.com', + 'author': 'Akretion,Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/intrastat', 'depends': ['base_vat', 'account'], 'conflicts': ['report_intrastat'], 'data': [ diff --git a/intrastat_base/i18n/intrastat_base.pot b/intrastat_base/i18n/intrastat_base.pot index fdc6996..e9e9889 100644 --- a/intrastat_base/i18n/intrastat_base.pot +++ b/intrastat_base/i18n/intrastat_base.pot @@ -4,10 +4,8 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-05-27 18:43+0000\n" -"PO-Revision-Date: 2015-05-27 18:43+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,23 +14,19 @@ msgstr "" "Plural-Forms: \n" #. module: intrastat_base -#: help:product.template,is_accessory_cost:0 +#: 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/intrastat_common.py:165 +#: code:addons/intrastat_base/models/intrastat_common.py:154 #, python-format msgid "Cannot delete the declaration %s because it is in Done state" msgstr "" #. module: intrastat_base -#: view:res.company:intrastat_base.view_company_form -msgid "Common Intrastat Settings" -msgstr "" - -#. module: intrastat_base -#: model:ir.model,name:intrastat_base.model_report_intrastat_common +#: model:ir.model,name:intrastat_base.model_intrastat_common msgid "Common functions for intrastat reports for products " msgstr "" @@ -42,7 +36,7 @@ msgid "Companies" msgstr "" #. module: intrastat_base -#: code:addons/intrastat_base/intrastat_common.py:68 +#: code:addons/intrastat_base/models/intrastat_common.py:33 #, python-format msgid "Company not yet set on intrastat report." msgstr "" @@ -53,83 +47,126 @@ msgid "Country" msgstr "" #. module: intrastat_base -#: view:res.country:intrastat_base.view_country_search -#: field:res.country,intrastat:0 +#: 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 +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 +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 msgid "EU Country" msgstr "" #. module: intrastat_base -#: field:product.template,exclude_from_intrastat:0 -msgid "Exclude from Intrastat reports" -msgstr "" - -#. module: intrastat_base -#: field:account.tax,exclude_from_intrastat_if_present:0 +#: model:ir.model.fields,field_description:intrastat_base.field_account_tax_exclude_from_intrastat_if_present msgid "Exclude invoice line from intrastat if this tax is present" msgstr "" #. module: intrastat_base -#: field:report.intrastat.common,id:0 +#: 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 -#: help:product.template,exclude_from_intrastat:0 -msgid "If set to True, the product or service will not be taken into account for Intrastat Product or Service reports. So you should leave this field to False unless you have a very good reason." -msgstr "" - -#. module: intrastat_base -#: help:account.tax,exclude_from_intrastat_if_present:0 +#: model:ir.model.fields,help:intrastat_base.field_account_tax_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 -#: view:product.template:intrastat_base.product_template_form_view +#: 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 +msgid "Intrastat" +msgstr "" + +#. module: intrastat_base +#: model:ir.ui.view,arch_db:intrastat_base.product_template_form_view msgid "Intrastat Properties" msgstr "" #. module: intrastat_base -#: model:ir.ui.menu,name:intrastat_base.menu_intrastat_base_root -msgid "Intrastat Reporting" +#: model:ir.ui.view,arch_db:intrastat_base.intrastat_result_view_form +msgid "Intrastat Result View" msgstr "" #. module: intrastat_base -#: view:res.company:intrastat_base.view_company_form -msgid "Intrastat Settings" -msgstr "" - -#. module: intrastat_base -#: field:product.template,is_accessory_cost:0 +#: 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 -#: help:res.company,intrastat_remind_user_ids:0 -msgid "List of OpenERP users who will receive a notification to remind them about the Intrastat declaration." +#: 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 -#: code:addons/intrastat_base/company.py:55 +#: 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 +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 +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 +msgid "List of emails of Users Receiving the Intrastat Reminder" +msgstr "" + +#. module: intrastat_base +#: code:addons/intrastat_base/models/res_company.py:38 #, 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 +msgid "Notes" +msgstr "" + +#. module: intrastat_base +#: model:ir.ui.view,arch_db:intrastat_base.intrastat_result_view_form +msgid "Ok" +msgstr "" + #. module: intrastat_base #: model:ir.model,name:intrastat_base.model_product_template msgid "Product Template" msgstr "" #. module: intrastat_base -#: view:res.country:intrastat_base.view_country_search +#: model:ir.ui.view,arch_db:intrastat_base.res_country_view_search msgid "Search Countries" msgstr "" #. module: intrastat_base -#: help:res.country,intrastat:0 +#: model:ir.model.fields,help:intrastat_base.field_res_country_intrastat msgid "Set to True for all European Union countries." msgstr "" #. module: intrastat_base +#: model:product.product,name:intrastat_base.shipping_costs_exclude #: model:product.template,name:intrastat_base.shipping_costs_exclude_product_template msgid "Shipping costs" msgstr "" @@ -140,43 +177,48 @@ msgid "Tax" msgstr "" #. module: intrastat_base -#: code:addons/intrastat_base/intrastat_common.py:84 +#: code:addons/intrastat_base/models/intrastat_common.py:51 #, python-format msgid "The VAT number is not set for the partner '%s'." msgstr "" #. module: intrastat_base -#: code:addons/intrastat_base/intrastat_common.py:76 +#: code:addons/intrastat_base/models/intrastat_common.py:41 #, python-format msgid "The company currency must be 'EUR', but is currently '%s'." msgstr "" #. module: intrastat_base -#: code:addons/intrastat_base/intrastat_common.py:72 +#: code:addons/intrastat_base/models/intrastat_common.py:37 #, python-format msgid "The country is not set on the company '%s'." msgstr "" #. module: intrastat_base -#: code:addons/intrastat_base/intrastat_common.py:105 +#: code:addons/intrastat_base/models/intrastat_common.py:74 #, python-format msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s." msgstr "" #. module: intrastat_base -#: code:addons/intrastat_base/product.py:51 +#: code:addons/intrastat_base/models/product_template.py:23 #, 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/intrastat_common.py:62 -#, python-format -msgid "The start date must be the first day of the month" -msgstr "" - -#. module: intrastat_base -#: field:res.company,intrastat_remind_user_ids:0 +#: 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" +msgstr "" + diff --git a/intrastat_base/models/__init__.py b/intrastat_base/models/__init__.py index b659505..68e2955 100644 --- a/intrastat_base/models/__init__.py +++ b/intrastat_base/models/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from . import res_country from . import product_template from . import account_tax diff --git a/intrastat_base/models/account_tax.py b/intrastat_base/models/account_tax.py index f9997fc..2235255 100644 --- a/intrastat_base/models/account_tax.py +++ b/intrastat_base/models/account_tax.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2011-2016 Akretion (http://www.akretion.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/intrastat_base/models/intrastat_common.py b/intrastat_base/models/intrastat_common.py index 9508d80..ba508de 100644 --- a/intrastat_base/models/intrastat_common.py +++ b/intrastat_base/models/intrastat_common.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2010-2016 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/intrastat_base/models/product_template.py b/intrastat_base/models/product_template.py index 71cb987..a0725f8 100644 --- a/intrastat_base/models/product_template.py +++ b/intrastat_base/models/product_template.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2010-2016 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/intrastat_base/models/res_company.py b/intrastat_base/models/res_company.py index 5d4a4e7..4b110f0 100644 --- a/intrastat_base/models/res_company.py +++ b/intrastat_base/models/res_company.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2013-2017 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/intrastat_base/models/res_config_settings.py b/intrastat_base/models/res_config_settings.py index 3457b8a..4191666 100644 --- a/intrastat_base/models/res_config_settings.py +++ b/intrastat_base/models/res_config_settings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2017 Akretion (Alexis de Lattre ) # © 2018 brain-tec AG (Kumar Aberer ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/intrastat_base/models/res_country.py b/intrastat_base/models/res_country.py index 19f34f2..9b4868c 100644 --- a/intrastat_base/models/res_country.py +++ b/intrastat_base/models/res_country.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2011-2014 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/intrastat_base/tests/__init__.py b/intrastat_base/tests/__init__.py new file mode 100644 index 0000000..7836283 --- /dev/null +++ b/intrastat_base/tests/__init__.py @@ -0,0 +1 @@ +from . import test_all diff --git a/intrastat_base/tests/test_all.py b/intrastat_base/tests/test_all.py new file mode 100644 index 0000000..fbc91ac --- /dev/null +++ b/intrastat_base/tests/test_all.py @@ -0,0 +1,22 @@ +from odoo.tests.common import TransactionCase + + +class TestIntrastatBase(TransactionCase): + """Tests for this module""" + + def test_10_countries(self): + # check if only EU countries have the 'intrastat' bit set + france = self.env.ref('base.fr') + self.assertTrue(france.intrastat) + brazil = self.env.ref('base.br') + self.assertFalse(brazil.intrastat) + + def test_20_company(self): + # add 'Demo user' to intrastat_remind_user_ids + demo_user = self.env.ref('base.user_demo') + 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)