From 4b0275018ca6bff15fbe81526a956f5b5dc5cee4 Mon Sep 17 00:00:00 2001 From: BenjaHe Date: Thu, 19 Dec 2019 09:18:09 +0100 Subject: [PATCH 1/9] [13.0] [MIG] product harmonized system (#80) * Large code re-engineering following the Akretion-Noviat code sprint on intrastat This code has been written both by Luc de Meyer and myself. * hs_code display_name fix * major update intrastat V3 modules * Add product_origin_country_id on declaration/computation lines Copy incoterms and destination country from SO to invoice when invoicing from SO We need weight even when supplementary units is used Small cleanups and enhancements * Add support for accessory costs Add default values for intrastat transaction on company Code cleanup * this week's ci errors * Update README.rst Rename variables * Port intrastat_base to v10 Set 2 other modules to uninstallable Update README.rst: switch to new intrastat project * Port product_harmonized_system to v10 * Fix warning on display_name Special thanks to Pedro and Holger for finding the solution for display_name Fix demo data * [MIG] product_harmonized_system: Migration to 11.0 * [FIX] product_harmonized_system: fix get_hs_code_recurively * [IMP] *: removed utf-8 headers, changed icon and site * company model test, country model test as in v8 * png logo instead of svg, removed Python 2 utf-8 headers * [UPD] Update product_harmonized_system.pot * Add new module product_harmonized_system_delivery (hide native hs_code field) Finalize port to v11 * [FIX+IMP] intrastat_*: Several things: * Add readonly on some fields when state of declaration is done * Division by zero in computation of accessory costs * Add FR translation * Fix strings * Minor code updates * [MIG] intrastat_product: Migration to 11.0 * Small fixes in intrastat_base * account_tax_template * [ADD] icon.png * [UPD] Update product_harmonized_system.pot * Prepare v12 branch * [MIG] Migrate all modules from v11 to v12 * flake8 * [UPD] Update product_harmonized_system.pot * Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: intrastat-extrastat-12.0/intrastat-extrastat-12.0-product_harmonized_system Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-12-0/intrastat-extrastat-12-0-product_harmonized_system/ * [FIX] product_harmized_system DESCRIPTION.rst * [UPD] README.rst * [UPD] README.rst * Added translation using Weblate (Spanish) * Translated using Weblate (Spanish) Currently translated at 50.0% (18 of 36 strings) Translation: intrastat-extrastat-12.0/intrastat-extrastat-12.0-product_harmonized_system Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-12-0/intrastat-extrastat-12-0-product_harmonized_system/es/ * [MIG] product_harmonized_system : Migration to 13.0 * [IMP] product_harmonized_system: black, isort --- product_harmonized_system/README.rst | 95 ++++ product_harmonized_system/__init__.py | 1 + product_harmonized_system/__manifest__.py | 28 ++ .../demo/product_demo.xml | 75 +++ product_harmonized_system/i18n/es.po | 216 +++++++++ product_harmonized_system/i18n/fr.po | 240 ++++++++++ .../i18n/product_harmonized_system.pot | 206 +++++++++ product_harmonized_system/models/__init__.py | 3 + product_harmonized_system/models/hs_code.py | 103 +++++ .../models/product_category.py | 31 ++ .../models/product_template.py | 41 ++ .../readme/CONTRIBUTORS.rst | 3 + .../readme/DESCRIPTION.rst | 7 + product_harmonized_system/readme/INSTALL.rst | 1 + product_harmonized_system/readme/USAGE.rst | 3 + .../security/ir.model.access.csv | 3 + .../security/product_hs_security.xml | 10 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 437 ++++++++++++++++++ product_harmonized_system/views/hs_code.xml | 103 +++++ .../views/product_category.xml | 24 + .../views/product_template.xml | 23 + 22 files changed, 1653 insertions(+) create mode 100644 product_harmonized_system/README.rst create mode 100644 product_harmonized_system/__init__.py create mode 100644 product_harmonized_system/__manifest__.py create mode 100644 product_harmonized_system/demo/product_demo.xml create mode 100644 product_harmonized_system/i18n/es.po create mode 100644 product_harmonized_system/i18n/fr.po create mode 100644 product_harmonized_system/i18n/product_harmonized_system.pot create mode 100644 product_harmonized_system/models/__init__.py create mode 100644 product_harmonized_system/models/hs_code.py create mode 100644 product_harmonized_system/models/product_category.py create mode 100644 product_harmonized_system/models/product_template.py create mode 100644 product_harmonized_system/readme/CONTRIBUTORS.rst create mode 100644 product_harmonized_system/readme/DESCRIPTION.rst create mode 100644 product_harmonized_system/readme/INSTALL.rst create mode 100644 product_harmonized_system/readme/USAGE.rst create mode 100644 product_harmonized_system/security/ir.model.access.csv create mode 100644 product_harmonized_system/security/product_hs_security.xml create mode 100644 product_harmonized_system/static/description/icon.png create mode 100644 product_harmonized_system/static/description/index.html create mode 100644 product_harmonized_system/views/hs_code.xml create mode 100644 product_harmonized_system/views/product_category.xml create mode 100644 product_harmonized_system/views/product_template.xml diff --git a/product_harmonized_system/README.rst b/product_harmonized_system/README.rst new file mode 100644 index 0000000..360dcf6 --- /dev/null +++ b/product_harmonized_system/README.rst @@ -0,0 +1,95 @@ +=============================== +Product Harmonized System Codes +=============================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github + :target: https://github.com/OCA/intrastat-extrastat/tree/12.0/product_harmonized_system + :alt: OCA/intrastat-extrastat +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/intrastat-extrastat-12-0/intrastat-extrastat-12-0-product_harmonized_system + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/227/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module contains the objects for Harmonised System Codes (H.S. codes). The full nomenclature is available from the `World Customs Organisation `. These code are usually required on the Proforma invoices that are attached to the packages that are shipped abroad. + +This module also handle the local/national extensions to the H.S. codes. The import of the full nomenclature is not provided by this module ; it should be provided by localization modules. + +You will also be able to configure the country of origin of a product, which is often required on the proforma invoice for the customs. + +This module should be usefull for all companies that export physical goods abroad. This module is also used by the Intrastat modules for the European Union, cf the *intrastat_product* module. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +This module is NOT compatible with the *account_intrastat* module from Odoo Enterprise. + +Usage +===== + +As this module only depends on the *product* module and that module doesn't provide any menu entry, this module lacks a menu entry for H.S. Codes. A menu entry for H.S. codes is provided by the module *product_harmonized_system_stock*. + +Once the H.S. codes are created, you will be able to set the H.S. code on an product (under the *Information* tab) or on a product category. On the product form, you will also be able to set the *Country of Origin* of a product (for example, if the product is *made in China*, select *China* as *Country of Origin*). + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* brain-tec AG +* Akretion +* Noviat + +Contributors +~~~~~~~~~~~~ + +* Alexis de Lattre, Akretion +* Luc De Meyer, Noviat +* Kumar Aberer, brain-tec AG + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/intrastat-extrastat `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_harmonized_system/__init__.py b/product_harmonized_system/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/product_harmonized_system/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_harmonized_system/__manifest__.py b/product_harmonized_system/__manifest__.py new file mode 100644 index 0000000..8aa90ed --- /dev/null +++ b/product_harmonized_system/__manifest__.py @@ -0,0 +1,28 @@ +# Copyright 2018 brain-tec AG (http://www.braintec-group.com) +# Copyright 2011-2016 Akretion (http://www.akretion.com) +# Copyright 2009-2019 Noviat (http://www.noviat.com) +# @author Benjamin Henquet +# @author Kumar Aberer +# @author Alexis de Lattre +# @author Luc de Meyer +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Product Harmonized System Codes", + "version": "13.0.1.0.0", + "category": "Reporting", + "license": "AGPL-3", + "summary": "Base module for Product Import/Export reports", + "author": "brain-tec AG, Akretion, Noviat, " "Odoo Community Association (OCA)", + "depends": ["product"], + "excludes": ["account_intrastat"], + "data": [ + "security/product_hs_security.xml", + "security/ir.model.access.csv", + "views/hs_code.xml", + "views/product_category.xml", + "views/product_template.xml", + ], + "demo": ["demo/product_demo.xml"], + "installable": True, +} diff --git a/product_harmonized_system/demo/product_demo.xml b/product_harmonized_system/demo/product_demo.xml new file mode 100644 index 0000000..423f67d --- /dev/null +++ b/product_harmonized_system/demo/product_demo.xml @@ -0,0 +1,75 @@ + + + + + + + + 84715000 + Automatic data-processing machines (computers) + + + + 84717050 + Storage units + + + + 85340090 + Printed circuits + + + + + + 8.7 + + + + + + 1.1 + + + + + + 8.2 + + + + + + 0.01 + + + + + + 0.67 + + + + + + 1.05 + + + + + + 0.3 + + + + + + 3.3 + + + + diff --git a/product_harmonized_system/i18n/es.po b/product_harmonized_system/i18n/es.po new file mode 100644 index 0000000..2243703 --- /dev/null +++ b/product_harmonized_system/i18n/es.po @@ -0,0 +1,216 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_harmonized_system +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-11-10 18:34+0000\n" +"Last-Translator: Galoperd \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.8\n" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid " Product Categs" +msgstr " Categs Producto" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid " Products" +msgstr " Productos" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__active +msgid "Active" +msgstr "Activo" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_search +msgid "Archived" +msgstr "Archivado" + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.84715000 +msgid "Automatic data-processing machines (computers)" +msgstr "Máquinas de procesado de datos automático (ordenadores)" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_hs_code__local_code +msgid "Code used for the national Import/Export declaration. The national code starts with the 6 digits of the H.S. and often has a few additional digits to extend the H.S. code." +msgstr "" +"Código utilizado para la declaración Import/Export. El código nacional " +"empieza con 6 dígitos del H.S. y a menudo tiene un pocos dígitos adicionales " +"para extender el código H.S." + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__company_id +msgid "Company" +msgstr "Compañía" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__origin_country_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__origin_country_id +msgid "Country of Origin" +msgstr "País de Origen" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_product__origin_country_id +#: model:ir.model.fields,help:product_harmonized_system.field_product_template__origin_country_id +msgid "Country of origin of the product i.e. product 'made in ____'." +msgstr "País de origen del producto p.e. producto ‘fabricado en_____’." + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__create_date +msgid "Created on" +msgstr "Creado en" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__description +msgid "Description" +msgstr "Descripción" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_hs_code +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__hs_code +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__hs_code_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__hs_code_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__hs_code_id +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid "H.S. Code" +msgstr "Código HS" + +#. module: product_harmonized_system +#: model:ir.actions.act_window,name:product_harmonized_system.hs_code_action +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_tree +msgid "H.S. Codes" +msgstr "Códigos HS" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_category__hs_code_id +msgid "Harmonised System Code. If this code is not set on the product itself, it will be read here, on the related product category." +msgstr "" +"Código del Sistema Armonizado HS. Si el código no está escrito en el " +"producto, se leerá aquí, en la categoría de producto relacionada." + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_product__hs_code_id +#: model:ir.model.fields,help:product_harmonized_system.field_product_template__hs_code_id +msgid "Harmonised System Code. Nomenclature is available from the World Customs Organisation, see http://www.wcoomd.org/. You can leave this field empty and configure the H.S. code on the product category." +msgstr "" +"Harmonised System Code. Nomenclatura disponible en World Customs " +"Organisation, ver http://www.wcoomd.org/. Puede dejar este campo vacío y " +"configurar el código H.S. en la categoría de producto.." + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_hs_code__hs_code +msgid "Harmonized System code (6 digits). Full list is available from the World Customs Organisation, see http://www.wcoomd.org" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__id +msgid "ID" +msgstr "" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.product_category_form_view +msgid "Import/Export Properties" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code____last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__local_code +msgid "Local Code" +msgstr "" + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.85340090 +msgid "Printed circuits" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_product +msgid "Product" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_categ_count +msgid "Product Categ Count" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.actions.act_window,name:product_harmonized_system.product_categ_hs_code_action +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_categ_ids +msgid "Product Categories" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_category +msgid "Product Category" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_tmpl_count +msgid "Product Tmpl Count" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.actions.act_window,name:product_harmonized_system.product_template_hs_code_action +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_tmpl_ids +msgid "Products" +msgstr "" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_search +msgid "Search H.S. Codes" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_hs_code__description +msgid "Short text description of the H.S. category" +msgstr "" + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.84717050 +msgid "Storage units" +msgstr "" + +#. module: product_harmonized_system +#: sql_constraint:hs.code:0 +msgid "This code already exists for this company !" +msgstr "Este código ya existe para esta compañía !" diff --git a/product_harmonized_system/i18n/fr.po b/product_harmonized_system/i18n/fr.po new file mode 100644 index 0000000..1b0fadc --- /dev/null +++ b/product_harmonized_system/i18n/fr.po @@ -0,0 +1,240 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_harmonized_system +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-07-16 13:11+0000\n" +"PO-Revision-Date: 2015-07-16 13:11+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid " Product Categs" +msgstr "" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid " Products" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__active +msgid "Active" +msgstr "Actif" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_search +msgid "Archived" +msgstr "" + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.84715000 +msgid "Automatic data-processing machines (computers)" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_hs_code__local_code +msgid "" +"Code used for the national Import/Export declaration. The national code " +"starts with the 6 digits of the H.S. and often has a few additional digits " +"to extend the H.S. code." +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__company_id +msgid "Company" +msgstr "Société" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__origin_country_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__origin_country_id +msgid "Country of Origin" +msgstr "Pays d'origine" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_product__origin_country_id +#: model:ir.model.fields,help:product_harmonized_system.field_product_template__origin_country_id +msgid "Country of origin of the product i.e. product 'made in ____'." +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__description +msgid "Description" +msgstr "Description" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_hs_code +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__hs_code +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__hs_code_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__hs_code_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__hs_code_id +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid "H.S. Code" +msgstr "Code S.H." + +#. module: product_harmonized_system +#: model:ir.actions.act_window,name:product_harmonized_system.hs_code_action +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_tree +#, fuzzy +msgid "H.S. Codes" +msgstr "Code S.H." + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_category__hs_code_id +msgid "" +"Harmonised System Code. If this code is not set on the product itself, it " +"will be read here, on the related product category." +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_product__hs_code_id +#: model:ir.model.fields,help:product_harmonized_system.field_product_template__hs_code_id +msgid "" +"Harmonised System Code. Nomenclature is available from the World Customs " +"Organisation, see http://www.wcoomd.org/. You can leave this field empty and " +"configure the H.S. code on the product category." +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_hs_code__hs_code +msgid "" +"Harmonized System code (6 digits). Full list is available from the World " +"Customs Organisation, see http://www.wcoomd.org" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__id +msgid "ID" +msgstr "ID" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.product_category_form_view +msgid "Import/Export Properties" +msgstr "Propriétés pour l'import/export" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code____last_update +#, fuzzy +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__write_uid +msgid "Last Updated by" +msgstr "Dernière modification par" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__write_date +msgid "Last Updated on" +msgstr "Dernière modification le" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__local_code +msgid "Local Code" +msgstr "Code local" + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.85340090 +msgid "Printed circuits" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_product +#, fuzzy +msgid "Product" +msgstr "Catégorie d'articles" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_categ_count +#, fuzzy +#| msgid "Product Category" +msgid "Product Categ Count" +msgstr "Catégorie d'articles" + +#. module: product_harmonized_system +#: model:ir.actions.act_window,name:product_harmonized_system.product_categ_hs_code_action +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_categ_ids +#, fuzzy +msgid "Product Categories" +msgstr "Catégorie d'articles" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_category +msgid "Product Category" +msgstr "Catégorie d'articles" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_template +msgid "Product Template" +msgstr "Modèle d'article" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_tmpl_count +#, fuzzy +#| msgid "Product Template" +msgid "Product Tmpl Count" +msgstr "Modèle d'article" + +#. module: product_harmonized_system +#: model:ir.actions.act_window,name:product_harmonized_system.product_template_hs_code_action +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_tmpl_ids +msgid "Products" +msgstr "" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_search +#, fuzzy +msgid "Search H.S. Codes" +msgstr "Recherche dans les codes S.H." + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_hs_code__description +msgid "Short text description of the H.S. category" +msgstr "Courte description de la catégorie H.S." + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.84717050 +msgid "Storage units" +msgstr "" + +#. module: product_harmonized_system +#: sql_constraint:hs.code:0 +msgid "This code already exists for this company !" +msgstr "Ce code existe déjà pour cette société !" + +#~ msgid "" +#~ "Code used for the national Import/Export declaration. e.g. Intrastat for " +#~ "the European Union" +#~ msgstr "" +#~ "Code utilisé pour la déclaration nationale d'import/export, par exemple " +#~ "la DEB pour la France" + +#~ msgid "HS Code" +#~ msgstr "Code S.H." + +#~ msgid "HS Codes" +#~ msgstr "Codes S.H." diff --git a/product_harmonized_system/i18n/product_harmonized_system.pot b/product_harmonized_system/i18n/product_harmonized_system.pot new file mode 100644 index 0000000..7f35c09 --- /dev/null +++ b/product_harmonized_system/i18n/product_harmonized_system.pot @@ -0,0 +1,206 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_harmonized_system +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid " Product Categs" +msgstr "" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid " Products" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__active +msgid "Active" +msgstr "" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_search +msgid "Archived" +msgstr "" + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.84715000 +msgid "Automatic data-processing machines (computers)" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_hs_code__local_code +msgid "Code used for the national Import/Export declaration. The national code starts with the 6 digits of the H.S. and often has a few additional digits to extend the H.S. code." +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__company_id +msgid "Company" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__origin_country_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__origin_country_id +msgid "Country of Origin" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_product__origin_country_id +#: model:ir.model.fields,help:product_harmonized_system.field_product_template__origin_country_id +msgid "Country of origin of the product i.e. product 'made in ____'." +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__create_uid +msgid "Created by" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__create_date +msgid "Created on" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__description +msgid "Description" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__display_name +msgid "Display Name" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_hs_code +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__hs_code +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__hs_code_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__hs_code_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__hs_code_id +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid "H.S. Code" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.actions.act_window,name:product_harmonized_system.hs_code_action +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_tree +msgid "H.S. Codes" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_category__hs_code_id +msgid "Harmonised System Code. If this code is not set on the product itself, it will be read here, on the related product category." +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_product__hs_code_id +#: model:ir.model.fields,help:product_harmonized_system.field_product_template__hs_code_id +msgid "Harmonised System Code. Nomenclature is available from the World Customs Organisation, see http://www.wcoomd.org/. You can leave this field empty and configure the H.S. code on the product category." +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_hs_code__hs_code +msgid "Harmonized System code (6 digits). Full list is available from the World Customs Organisation, see http://www.wcoomd.org" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__id +msgid "ID" +msgstr "" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.product_category_form_view +msgid "Import/Export Properties" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code____last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__local_code +msgid "Local Code" +msgstr "" + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.85340090 +msgid "Printed circuits" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_product +msgid "Product" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_categ_count +msgid "Product Categ Count" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.actions.act_window,name:product_harmonized_system.product_categ_hs_code_action +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_categ_ids +msgid "Product Categories" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_category +msgid "Product Category" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_tmpl_count +msgid "Product Tmpl Count" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.actions.act_window,name:product_harmonized_system.product_template_hs_code_action +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_tmpl_ids +msgid "Products" +msgstr "" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_search +msgid "Search H.S. Codes" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_hs_code__description +msgid "Short text description of the H.S. category" +msgstr "" + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.84717050 +msgid "Storage units" +msgstr "" + +#. module: product_harmonized_system +#: sql_constraint:hs.code:0 +msgid "This code already exists for this company !" +msgstr "" + diff --git a/product_harmonized_system/models/__init__.py b/product_harmonized_system/models/__init__.py new file mode 100644 index 0000000..cd4fd51 --- /dev/null +++ b/product_harmonized_system/models/__init__.py @@ -0,0 +1,3 @@ +from . import hs_code +from . import product_category +from . import product_template diff --git a/product_harmonized_system/models/hs_code.py b/product_harmonized_system/models/hs_code.py new file mode 100644 index 0000000..fab4283 --- /dev/null +++ b/product_harmonized_system/models/hs_code.py @@ -0,0 +1,103 @@ +# Copyright 2011-2016 Akretion France (http://www.akretion.com) +# Copyright 2009-2016 Noviat (http://www.noviat.com) +# @author Alexis de Lattre +# @author Luc de Meyer +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class HSCode(models.Model): + _name = "hs.code" + _description = "H.S. Code" + _order = "local_code" + _rec_name = "local_code" + + hs_code = fields.Char( + string="H.S. Code", + compute="_compute_hs_code", + readonly=True, + help="Harmonized System code (6 digits). Full list is " + "available from the World Customs Organisation, see " + "http://www.wcoomd.org", + ) + description = fields.Char( + translate=True, help="Short text description of the H.S. category" + ) + local_code = fields.Char( + required=True, + help="Code used for the national Import/Export declaration. " + "The national code starts with the 6 digits of the H.S. and often " + "has a few additional digits to extend the H.S. code.", + ) + active = fields.Boolean(default=True) + company_id = fields.Many2one( + "res.company", + string="Company", + readonly=True, + required=True, + default=lambda self: self.env["res.company"]._company_default_get(), + ) + product_categ_ids = fields.One2many( + comodel_name="product.category", + inverse_name="hs_code_id", + string="Product Categories", + readonly=True, + ) + product_tmpl_ids = fields.One2many( + comodel_name="product.template", + inverse_name="hs_code_id", + string="Products", + readonly=True, + ) + product_categ_count = fields.Integer(compute="_compute_product_categ_count") + product_tmpl_count = fields.Integer(compute="_compute_product_tmpl_count") + + @api.depends("local_code") + def _compute_hs_code(self): + for this in self: + this.hs_code = this.local_code and this.local_code[:6] + + @api.depends("product_categ_ids") + def _compute_product_categ_count(self): + # hs_code_id on product.category is company_dependent=True + # so we can't use a read_group() + for code in self: + code.product_categ_count = len(code.product_categ_ids) + + @api.depends("product_tmpl_ids") + def _compute_product_tmpl_count(self): + # hs_code_id on product.template is company_dependent=True + # so we can't use a read_group() + for code in self: + code.product_tmpl_count = len(code.product_tmpl_ids) + + @api.depends("local_code", "description") + def name_get(self): + res = [] + for this in self: + name = this.local_code + if this.description: + name += " " + this.description + name = len(name) > 55 and name[:55] + "..." or name + res.append((this.id, name)) + return res + + _sql_constraints = [ + ( + "local_code_company_uniq", + "unique(local_code, company_id)", + "This code already exists for this company !", + ) + ] + + @api.model + def create(self, vals): + if vals.get("local_code"): + vals["local_code"] = vals["local_code"].replace(" ", "") + return super(HSCode, self).create(vals) + + def write(self, vals): + if vals.get("local_code"): + vals["local_code"] = vals["local_code"].replace(" ", "") + return super(HSCode, self).write(vals) diff --git a/product_harmonized_system/models/product_category.py b/product_harmonized_system/models/product_category.py new file mode 100644 index 0000000..e195026 --- /dev/null +++ b/product_harmonized_system/models/product_category.py @@ -0,0 +1,31 @@ +# Copyright 2011-2016 Akretion France (http://www.akretion.com) +# Copyright 2009-2016 Noviat (http://www.noviat.com) +# @author Alexis de Lattre +# @author Luc de Meyer +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductCategory(models.Model): + _inherit = "product.category" + + hs_code_id = fields.Many2one( + "hs.code", + string="H.S. Code", + company_dependent=True, + ondelete="restrict", + help="Harmonised System Code. If this code is not " + "set on the product itself, it will be read here, on the " + "related product category.", + ) + + def get_hs_code_recursively(self): + self.ensure_one() + if self.hs_code_id: + res = self.hs_code_id + elif self.parent_id: + res = self.parent_id.get_hs_code_recursively() + else: + res = self.env["hs.code"] + return res diff --git a/product_harmonized_system/models/product_template.py b/product_harmonized_system/models/product_template.py new file mode 100644 index 0000000..dadf02d --- /dev/null +++ b/product_harmonized_system/models/product_template.py @@ -0,0 +1,41 @@ +# Copyright 2011-2016 Akretion (http://www.akretion.com) +# Copyright 2009-2016 Noviat (http://www.noviat.com) +# @author Alexis de Lattre +# @author Luc de Meyer +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + hs_code_id = fields.Many2one( + "hs.code", + string="H.S. Code", + company_dependent=True, + ondelete="restrict", + help="Harmonised System Code. Nomenclature is " + "available from the World Customs Organisation, see " + "http://www.wcoomd.org/. You can leave this field empty " + "and configure the H.S. code on the product category.", + ) + origin_country_id = fields.Many2one( + "res.country", + string="Country of Origin", + help="Country of origin of the product i.e. product " "'made in ____'.", + ) + + +class ProductProduct(models.Model): + _inherit = "product.product" + + def get_hs_code_recursively(self): + res = self.env["hs.code"] + if self: + self.ensure_one() + if self.hs_code_id: + res = self.hs_code_id + elif self.categ_id: + res = self.categ_id.get_hs_code_recursively() + return res diff --git a/product_harmonized_system/readme/CONTRIBUTORS.rst b/product_harmonized_system/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..439f3b3 --- /dev/null +++ b/product_harmonized_system/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Alexis de Lattre, Akretion +* Luc De Meyer, Noviat +* Kumar Aberer, brain-tec AG diff --git a/product_harmonized_system/readme/DESCRIPTION.rst b/product_harmonized_system/readme/DESCRIPTION.rst new file mode 100644 index 0000000..2481baa --- /dev/null +++ b/product_harmonized_system/readme/DESCRIPTION.rst @@ -0,0 +1,7 @@ +This module contains the objects for Harmonised System Codes (H.S. codes). The full nomenclature is available from the `World Customs Organisation `. These code are usually required on the Proforma invoices that are attached to the packages that are shipped abroad. + +This module also handle the local/national extensions to the H.S. codes. The import of the full nomenclature is not provided by this module ; it should be provided by localization modules. + +You will also be able to configure the country of origin of a product, which is often required on the proforma invoice for the customs. + +This module should be usefull for all companies that export physical goods abroad. This module is also used by the Intrastat modules for the European Union, cf the *intrastat_product* module. diff --git a/product_harmonized_system/readme/INSTALL.rst b/product_harmonized_system/readme/INSTALL.rst new file mode 100644 index 0000000..5b11a6a --- /dev/null +++ b/product_harmonized_system/readme/INSTALL.rst @@ -0,0 +1 @@ +This module is NOT compatible with the *account_intrastat* module from Odoo Enterprise. diff --git a/product_harmonized_system/readme/USAGE.rst b/product_harmonized_system/readme/USAGE.rst new file mode 100644 index 0000000..7d955cd --- /dev/null +++ b/product_harmonized_system/readme/USAGE.rst @@ -0,0 +1,3 @@ +As this module only depends on the *product* module and that module doesn't provide any menu entry, this module lacks a menu entry for H.S. Codes. A menu entry for H.S. codes is provided by the module *product_harmonized_system_stock*. + +Once the H.S. codes are created, you will be able to set the H.S. code on an product (under the *Information* tab) or on a product category. On the product form, you will also be able to set the *Country of Origin* of a product (for example, if the product is *made in China*, select *China* as *Country of Origin*). diff --git a/product_harmonized_system/security/ir.model.access.csv b/product_harmonized_system/security/ir.model.access.csv new file mode 100644 index 0000000..e22ebdd --- /dev/null +++ b/product_harmonized_system/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_hs_code_group_system,Full access on hs.code to Settings group,model_hs_code,base.group_system,1,1,1,1 +access_hs_code_read,Read access on hs.code to everybody,model_hs_code,,1,0,0,0 diff --git a/product_harmonized_system/security/product_hs_security.xml b/product_harmonized_system/security/product_hs_security.xml new file mode 100644 index 0000000..c7da6fb --- /dev/null +++ b/product_harmonized_system/security/product_hs_security.xml @@ -0,0 +1,10 @@ + + + + + HS Code Company rule + + ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + + + diff --git a/product_harmonized_system/static/description/icon.png b/product_harmonized_system/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbk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5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/product_harmonized_system/static/description/index.html b/product_harmonized_system/static/description/index.html new file mode 100644 index 0000000..4702594 --- /dev/null +++ b/product_harmonized_system/static/description/index.html @@ -0,0 +1,437 @@ + + + + + + +Product Harmonized System Codes + + + +
+

Product Harmonized System Codes

+ + +

Beta License: AGPL-3 OCA/intrastat-extrastat Translate me on Weblate Try me on Runbot

+

This module contains the objects for Harmonised System Codes (H.S. codes). The full nomenclature is available from the World Customs Organisation <http://www.wcoomd.org/>. These code are usually required on the Proforma invoices that are attached to the packages that are shipped abroad.

+

This module also handle the local/national extensions to the H.S. codes. The import of the full nomenclature is not provided by this module ; it should be provided by localization modules.

+

You will also be able to configure the country of origin of a product, which is often required on the proforma invoice for the customs.

+

This module should be usefull for all companies that export physical goods abroad. This module is also used by the Intrastat modules for the European Union, cf the intrastat_product module.

+

Table of contents

+ +
+

Installation

+

This module is NOT compatible with the account_intrastat module from Odoo Enterprise.

+
+
+

Usage

+

As this module only depends on the product module and that module doesn’t provide any menu entry, this module lacks a menu entry for H.S. Codes. A menu entry for H.S. codes is provided by the module product_harmonized_system_stock.

+

Once the H.S. codes are created, you will be able to set the H.S. code on an product (under the Information tab) or on a product category. On the product form, you will also be able to set the Country of Origin of a product (for example, if the product is made in China, select China as Country of Origin).

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • brain-tec AG
  • +
  • Akretion
  • +
  • Noviat
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/intrastat-extrastat project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_harmonized_system/views/hs_code.xml b/product_harmonized_system/views/hs_code.xml new file mode 100644 index 0000000..93a5e46 --- /dev/null +++ b/product_harmonized_system/views/hs_code.xml @@ -0,0 +1,103 @@ + + + + + + + + hs.code.search + hs.code + + + + + + + + + + + hs.code.tree + hs.code + + + + + + + + + + + + + Product Categories + product.category + tree,form + [('hs_code_id', '=', active_id)] + + + + Products + product.template + kanban,tree,form + [('hs_code_id', '=', active_id)] + + + + + hs.code.form + hs.code + +
+
+ + + +
+ + + + + + +
+
+
+ + + + H.S. Codes + hs.code + tree,form + + + + +
diff --git a/product_harmonized_system/views/product_category.xml b/product_harmonized_system/views/product_category.xml new file mode 100644 index 0000000..419f2e0 --- /dev/null +++ b/product_harmonized_system/views/product_category.xml @@ -0,0 +1,24 @@ + + + + + + + + hs_code.product.category.form + product.category + + + + + + + + + + + diff --git a/product_harmonized_system/views/product_template.xml b/product_harmonized_system/views/product_template.xml new file mode 100644 index 0000000..b382e8c --- /dev/null +++ b/product_harmonized_system/views/product_template.xml @@ -0,0 +1,23 @@ + + + + + + + + hs_code.product.template.form + product.template + + + + + + + + + + From 616b433869d02ca7e6523b23b52111a7724087d3 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 19 Dec 2019 08:18:15 +0000 Subject: [PATCH 2/9] [UPD] README.rst --- product_harmonized_system/README.rst | 10 +++++----- .../static/description/index.html | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/product_harmonized_system/README.rst b/product_harmonized_system/README.rst index 360dcf6..eea323f 100644 --- a/product_harmonized_system/README.rst +++ b/product_harmonized_system/README.rst @@ -14,13 +14,13 @@ Product Harmonized System Codes :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github - :target: https://github.com/OCA/intrastat-extrastat/tree/12.0/product_harmonized_system + :target: https://github.com/OCA/intrastat-extrastat/tree/13.0/product_harmonized_system :alt: OCA/intrastat-extrastat .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/intrastat-extrastat-12-0/intrastat-extrastat-12-0-product_harmonized_system + :target: https://translation.odoo-community.org/projects/intrastat-extrastat-13-0/intrastat-extrastat-13-0-product_harmonized_system :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/227/12.0 + :target: https://runbot.odoo-community.org/runbot/227/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -56,7 +56,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -90,6 +90,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/intrastat-extrastat `_ project on GitHub. +This module is part of the `OCA/intrastat-extrastat `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_harmonized_system/static/description/index.html b/product_harmonized_system/static/description/index.html index 4702594..7cfc809 100644 --- a/product_harmonized_system/static/description/index.html +++ b/product_harmonized_system/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/intrastat-extrastat Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/intrastat-extrastat Translate me on Weblate Try me on Runbot

This module contains the objects for Harmonised System Codes (H.S. codes). The full nomenclature is available from the World Customs Organisation <http://www.wcoomd.org/>. These code are usually required on the Proforma invoices that are attached to the packages that are shipped abroad.

This module also handle the local/national extensions to the H.S. codes. The import of the full nomenclature is not provided by this module ; it should be provided by localization modules.

You will also be able to configure the country of origin of a product, which is often required on the proforma invoice for the customs.

@@ -400,7 +400,7 @@ ul.auto-toc {

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -428,7 +428,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/intrastat-extrastat project on GitHub.

+

This module is part of the OCA/intrastat-extrastat project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

From b7aabe1dbdbf702f0746ba1fa2eb5140e241a3c1 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Thu, 9 Jan 2020 19:57:50 +0000 Subject: [PATCH 3/9] [UPD] Update product_harmonized_system.pot --- .../i18n/product_harmonized_system.pot | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/product_harmonized_system/i18n/product_harmonized_system.pot b/product_harmonized_system/i18n/product_harmonized_system.pot index 7f35c09..2be2b53 100644 --- a/product_harmonized_system/i18n/product_harmonized_system.pot +++ b/product_harmonized_system/i18n/product_harmonized_system.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_harmonized_system +# * product_harmonized_system # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -40,7 +40,10 @@ msgstr "" #. module: product_harmonized_system #: model:ir.model.fields,help:product_harmonized_system.field_hs_code__local_code -msgid "Code used for the national Import/Export declaration. The national code starts with the 6 digits of the H.S. and often has a few additional digits to extend the H.S. code." +msgid "" +"Code used for the national Import/Export declaration. The national code " +"starts with the 6 digits of the H.S. and often has a few additional digits " +"to extend the H.S. code." msgstr "" #. module: product_harmonized_system @@ -98,18 +101,25 @@ msgstr "" #. module: product_harmonized_system #: model:ir.model.fields,help:product_harmonized_system.field_product_category__hs_code_id -msgid "Harmonised System Code. If this code is not set on the product itself, it will be read here, on the related product category." +msgid "" +"Harmonised System Code. If this code is not set on the product itself, it " +"will be read here, on the related product category." msgstr "" #. module: product_harmonized_system #: model:ir.model.fields,help:product_harmonized_system.field_product_product__hs_code_id #: model:ir.model.fields,help:product_harmonized_system.field_product_template__hs_code_id -msgid "Harmonised System Code. Nomenclature is available from the World Customs Organisation, see http://www.wcoomd.org/. You can leave this field empty and configure the H.S. code on the product category." +msgid "" +"Harmonised System Code. Nomenclature is available from the World Customs " +"Organisation, see http://www.wcoomd.org/. You can leave this field empty and" +" configure the H.S. code on the product category." msgstr "" #. module: product_harmonized_system #: model:ir.model.fields,help:product_harmonized_system.field_hs_code__hs_code -msgid "Harmonized System code (6 digits). Full list is available from the World Customs Organisation, see http://www.wcoomd.org" +msgid "" +"Harmonized System code (6 digits). Full list is available from the World " +"Customs Organisation, see http://www.wcoomd.org" msgstr "" #. module: product_harmonized_system @@ -200,7 +210,6 @@ msgid "Storage units" msgstr "" #. module: product_harmonized_system -#: sql_constraint:hs.code:0 +#: model:ir.model.constraint,message:product_harmonized_system.constraint_hs_code_local_code_company_uniq msgid "This code already exists for this company !" msgstr "" - From 6aa93db78fc33f9bdde2a8ce2109804990a72527 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Thu, 9 Jan 2020 20:03:25 +0000 Subject: [PATCH 4/9] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: intrastat-extrastat-13.0/intrastat-extrastat-13.0-product_harmonized_system Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-13-0/intrastat-extrastat-13-0-product_harmonized_system/ --- product_harmonized_system/i18n/es.po | 22 ++++++++++++++++------ product_harmonized_system/i18n/fr.po | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/product_harmonized_system/i18n/es.po b/product_harmonized_system/i18n/es.po index 2243703..2f85e70 100644 --- a/product_harmonized_system/i18n/es.po +++ b/product_harmonized_system/i18n/es.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_harmonized_system +# * product_harmonized_system # msgid "" msgstr "" @@ -43,7 +43,10 @@ msgstr "Máquinas de procesado de datos automático (ordenadores)" #. module: product_harmonized_system #: model:ir.model.fields,help:product_harmonized_system.field_hs_code__local_code -msgid "Code used for the national Import/Export declaration. The national code starts with the 6 digits of the H.S. and often has a few additional digits to extend the H.S. code." +msgid "" +"Code used for the national Import/Export declaration. The national code " +"starts with the 6 digits of the H.S. and often has a few additional digits " +"to extend the H.S. code." msgstr "" "Código utilizado para la declaración Import/Export. El código nacional " "empieza con 6 dígitos del H.S. y a menudo tiene un pocos dígitos adicionales " @@ -104,7 +107,9 @@ msgstr "Códigos HS" #. module: product_harmonized_system #: model:ir.model.fields,help:product_harmonized_system.field_product_category__hs_code_id -msgid "Harmonised System Code. If this code is not set on the product itself, it will be read here, on the related product category." +msgid "" +"Harmonised System Code. If this code is not set on the product itself, it " +"will be read here, on the related product category." msgstr "" "Código del Sistema Armonizado HS. Si el código no está escrito en el " "producto, se leerá aquí, en la categoría de producto relacionada." @@ -112,7 +117,10 @@ msgstr "" #. module: product_harmonized_system #: model:ir.model.fields,help:product_harmonized_system.field_product_product__hs_code_id #: model:ir.model.fields,help:product_harmonized_system.field_product_template__hs_code_id -msgid "Harmonised System Code. Nomenclature is available from the World Customs Organisation, see http://www.wcoomd.org/. You can leave this field empty and configure the H.S. code on the product category." +msgid "" +"Harmonised System Code. Nomenclature is available from the World Customs " +"Organisation, see http://www.wcoomd.org/. You can leave this field empty and " +"configure the H.S. code on the product category." msgstr "" "Harmonised System Code. Nomenclatura disponible en World Customs " "Organisation, ver http://www.wcoomd.org/. Puede dejar este campo vacío y " @@ -120,7 +128,9 @@ msgstr "" #. module: product_harmonized_system #: model:ir.model.fields,help:product_harmonized_system.field_hs_code__hs_code -msgid "Harmonized System code (6 digits). Full list is available from the World Customs Organisation, see http://www.wcoomd.org" +msgid "" +"Harmonized System code (6 digits). Full list is available from the World " +"Customs Organisation, see http://www.wcoomd.org" msgstr "" #. module: product_harmonized_system @@ -211,6 +221,6 @@ msgid "Storage units" msgstr "" #. module: product_harmonized_system -#: sql_constraint:hs.code:0 +#: model:ir.model.constraint,message:product_harmonized_system.constraint_hs_code_local_code_company_uniq msgid "This code already exists for this company !" msgstr "Este código ya existe para esta compañía !" diff --git a/product_harmonized_system/i18n/fr.po b/product_harmonized_system/i18n/fr.po index 1b0fadc..b49d68f 100644 --- a/product_harmonized_system/i18n/fr.po +++ b/product_harmonized_system/i18n/fr.po @@ -222,7 +222,7 @@ msgid "Storage units" msgstr "" #. module: product_harmonized_system -#: sql_constraint:hs.code:0 +#: model:ir.model.constraint,message:product_harmonized_system.constraint_hs_code_local_code_company_uniq msgid "This code already exists for this company !" msgstr "Ce code existe déjà pour cette société !" From 09c2717e44603cdf7218949244dd53b87192de49 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Tue, 3 Mar 2020 20:29:11 +0100 Subject: [PATCH 5/9] [13.0][FIX]replace deprecated _company_default_get --- product_harmonized_system/models/hs_code.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/product_harmonized_system/models/hs_code.py b/product_harmonized_system/models/hs_code.py index fab4283..b2ee7c8 100644 --- a/product_harmonized_system/models/hs_code.py +++ b/product_harmonized_system/models/hs_code.py @@ -36,7 +36,7 @@ class HSCode(models.Model): string="Company", readonly=True, required=True, - default=lambda self: self.env["res.company"]._company_default_get(), + default=lambda self: self._default_company_id(), ) product_categ_ids = fields.One2many( comodel_name="product.category", @@ -53,6 +53,10 @@ class HSCode(models.Model): product_categ_count = fields.Integer(compute="_compute_product_categ_count") product_tmpl_count = fields.Integer(compute="_compute_product_tmpl_count") + @api.model + def _default_company_id(self): + return self.env.company + @api.depends("local_code") def _compute_hs_code(self): for this in self: From 7ebef63daa8f76a8060fbc9199d9d6649717a3fc Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sat, 7 Mar 2020 15:11:19 +0000 Subject: [PATCH 6/9] product_harmonized_system 13.0.1.0.1 --- product_harmonized_system/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_harmonized_system/__manifest__.py b/product_harmonized_system/__manifest__.py index 8aa90ed..cb18a9d 100644 --- a/product_harmonized_system/__manifest__.py +++ b/product_harmonized_system/__manifest__.py @@ -9,7 +9,7 @@ { "name": "Product Harmonized System Codes", - "version": "13.0.1.0.0", + "version": "13.0.1.0.1", "category": "Reporting", "license": "AGPL-3", "summary": "Base module for Product Import/Export reports", From c9137b116be1879f093e1d8164b8cc97b72da827 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sat, 14 Mar 2020 12:01:50 +0100 Subject: [PATCH 7/9] pre-commit update --- .../demo/product_demo.xml | 121 +++++++------- .../security/product_hs_security.xml | 12 +- product_harmonized_system/views/hs_code.xml | 150 ++++++++++-------- .../views/product_category.xml | 25 ++- .../views/product_template.xml | 27 ++-- 5 files changed, 166 insertions(+), 169 deletions(-) diff --git a/product_harmonized_system/demo/product_demo.xml b/product_harmonized_system/demo/product_demo.xml index 423f67d..83022b8 100644 --- a/product_harmonized_system/demo/product_demo.xml +++ b/product_harmonized_system/demo/product_demo.xml @@ -1,75 +1,60 @@ - + - - - - - 84715000 - Automatic data-processing machines (computers) - - - - 84717050 - Storage units - - - - 85340090 - Printed circuits - - - - - - 8.7 - - - - - - 1.1 - - - - - - 8.2 - - - - - - 0.01 - - - - - - 0.67 - - - - - - 1.05 - - - - - - 0.3 - - - - - - 3.3 - - - + + 84715000 + Automatic data-processing machines (computers) + + + 84717050 + Storage units + + + 85340090 + Printed circuits + + + + + 8.7 + + + + + 1.1 + + + + + 8.2 + + + + + 0.01 + + + + + 0.67 + + + + + 1.05 + + + + + 0.3 + + + + + 3.3 + diff --git a/product_harmonized_system/security/product_hs_security.xml b/product_harmonized_system/security/product_hs_security.xml index c7da6fb..fc1a5e0 100644 --- a/product_harmonized_system/security/product_hs_security.xml +++ b/product_harmonized_system/security/product_hs_security.xml @@ -1,10 +1,10 @@ - + - - HS Code Company rule - - ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + HS Code Company rule + + ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] - diff --git a/product_harmonized_system/views/hs_code.xml b/product_harmonized_system/views/hs_code.xml index 93a5e46..1841ced 100644 --- a/product_harmonized_system/views/hs_code.xml +++ b/product_harmonized_system/views/hs_code.xml @@ -1,39 +1,41 @@ - + - - - hs.code.search - hs.code - - - - - - + hs.code.search + hs.code + + + + + + - - hs.code.tree - hs.code - - - - - - - - + hs.code.tree + hs.code + + + + + + + + - Product Categories @@ -41,63 +43,73 @@ tree,form [('hs_code_id', '=', active_id)] - Products product.template kanban,tree,form [('hs_code_id', '=', active_id)] - - hs.code.form - hs.code - -
-
- - - -
- - - - - - -
-
+ hs.code.form + hs.code + +
+
+ + + +
+ + + + + + +
+
- - H.S. Codes - hs.code - tree,form + H.S. Codes + hs.code + tree,form - -
diff --git a/product_harmonized_system/views/product_category.xml b/product_harmonized_system/views/product_category.xml index 419f2e0..eb58029 100644 --- a/product_harmonized_system/views/product_category.xml +++ b/product_harmonized_system/views/product_category.xml @@ -1,24 +1,21 @@ - + - - - hs_code.product.category.form - product.category - - - - - - - - + hs_code.product.category.form + product.category + + + + + + + + - diff --git a/product_harmonized_system/views/product_template.xml b/product_harmonized_system/views/product_template.xml index b382e8c..1907d8d 100644 --- a/product_harmonized_system/views/product_template.xml +++ b/product_harmonized_system/views/product_template.xml @@ -1,23 +1,26 @@ - + - - - hs_code.product.template.form - product.template - - - - - + hs_code.product.template.form + product.template + + + + + + - - From fbd1913eeedfaf35e735685b31db1662c41cba50 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 8 Jun 2020 22:39:46 +0200 Subject: [PATCH 8/9] intrastat_product: Add xml_attachment_id field intrastat_product: add mail.activity.mixin and widget in form view product_harmonized_system: remove archive button (use Action menu) All modules: - use super() instead of super(class, self) - Update domain_force in multi-company ir.rule to v13 standard --- product_harmonized_system/models/hs_code.py | 4 ++-- .../security/product_hs_security.xml | 2 +- product_harmonized_system/views/hs_code.xml | 19 +++++++------------ 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/product_harmonized_system/models/hs_code.py b/product_harmonized_system/models/hs_code.py index b2ee7c8..475c399 100644 --- a/product_harmonized_system/models/hs_code.py +++ b/product_harmonized_system/models/hs_code.py @@ -99,9 +99,9 @@ class HSCode(models.Model): def create(self, vals): if vals.get("local_code"): vals["local_code"] = vals["local_code"].replace(" ", "") - return super(HSCode, self).create(vals) + return super().create(vals) def write(self, vals): if vals.get("local_code"): vals["local_code"] = vals["local_code"].replace(" ", "") - return super(HSCode, self).write(vals) + return super().write(vals) diff --git a/product_harmonized_system/security/product_hs_security.xml b/product_harmonized_system/security/product_hs_security.xml index fc1a5e0..42c7761 100644 --- a/product_harmonized_system/security/product_hs_security.xml +++ b/product_harmonized_system/security/product_hs_security.xml @@ -5,6 +5,6 @@ ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + >['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] diff --git a/product_harmonized_system/views/hs_code.xml b/product_harmonized_system/views/hs_code.xml index 1841ced..4b0316c 100644 --- a/product_harmonized_system/views/hs_code.xml +++ b/product_harmonized_system/views/hs_code.xml @@ -55,6 +55,13 @@ hs.code
+ +
- From ed0ee879b00907153af831df7de01fbe72f9e8a6 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 19 Nov 2020 18:49:45 +0100 Subject: [PATCH 9/9] [MIG] product_harmonized_system to v14 --- product_harmonized_system/__manifest__.py | 10 ++++++---- product_harmonized_system/demo/product_demo.xml | 2 +- product_harmonized_system/models/hs_code.py | 4 ++-- product_harmonized_system/models/product_category.py | 4 ++-- product_harmonized_system/models/product_template.py | 4 ++-- product_harmonized_system/readme/DESCRIPTION.rst | 6 +++--- product_harmonized_system/readme/USAGE.rst | 2 +- product_harmonized_system/views/hs_code.xml | 6 +++--- product_harmonized_system/views/product_category.xml | 4 ++-- product_harmonized_system/views/product_template.xml | 2 +- 10 files changed, 23 insertions(+), 21 deletions(-) diff --git a/product_harmonized_system/__manifest__.py b/product_harmonized_system/__manifest__.py index cb18a9d..054a13e 100644 --- a/product_harmonized_system/__manifest__.py +++ b/product_harmonized_system/__manifest__.py @@ -1,6 +1,6 @@ -# Copyright 2018 brain-tec AG (http://www.braintec-group.com) -# Copyright 2011-2016 Akretion (http://www.akretion.com) -# Copyright 2009-2019 Noviat (http://www.noviat.com) +# Copyright 2018-2020 brain-tec AG (http://www.braintec-group.com) +# Copyright 2011-2020 Akretion (http://www.akretion.com) +# Copyright 2009-2020 Noviat (http://www.noviat.com) # @author Benjamin Henquet # @author Kumar Aberer # @author Alexis de Lattre @@ -9,11 +9,13 @@ { "name": "Product Harmonized System Codes", - "version": "13.0.1.0.1", + "version": "14.0.1.0.0", "category": "Reporting", "license": "AGPL-3", "summary": "Base module for Product Import/Export reports", "author": "brain-tec AG, Akretion, Noviat, " "Odoo Community Association (OCA)", + "maintainers": ["alexis-via", "luc-demeyer"], + "website": "https://github.com/OCA/intrastat-extrastat", "depends": ["product"], "excludes": ["account_intrastat"], "data": [ diff --git a/product_harmonized_system/demo/product_demo.xml b/product_harmonized_system/demo/product_demo.xml index 83022b8..902f4a8 100644 --- a/product_harmonized_system/demo/product_demo.xml +++ b/product_harmonized_system/demo/product_demo.xml @@ -1,6 +1,6 @@ diff --git a/product_harmonized_system/models/hs_code.py b/product_harmonized_system/models/hs_code.py index 475c399..49d869e 100644 --- a/product_harmonized_system/models/hs_code.py +++ b/product_harmonized_system/models/hs_code.py @@ -1,5 +1,5 @@ -# Copyright 2011-2016 Akretion France (http://www.akretion.com) -# Copyright 2009-2016 Noviat (http://www.noviat.com) +# Copyright 2011-2020 Akretion France (http://www.akretion.com) +# Copyright 2009-2020 Noviat (http://www.noviat.com) # @author Alexis de Lattre # @author Luc de Meyer # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/product_harmonized_system/models/product_category.py b/product_harmonized_system/models/product_category.py index e195026..d4400c9 100644 --- a/product_harmonized_system/models/product_category.py +++ b/product_harmonized_system/models/product_category.py @@ -1,5 +1,5 @@ -# Copyright 2011-2016 Akretion France (http://www.akretion.com) -# Copyright 2009-2016 Noviat (http://www.noviat.com) +# Copyright 2011-2020 Akretion France (http://www.akretion.com) +# Copyright 2009-2020 Noviat (http://www.noviat.com) # @author Alexis de Lattre # @author Luc de Meyer # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/product_harmonized_system/models/product_template.py b/product_harmonized_system/models/product_template.py index dadf02d..b37ee04 100644 --- a/product_harmonized_system/models/product_template.py +++ b/product_harmonized_system/models/product_template.py @@ -1,5 +1,5 @@ -# Copyright 2011-2016 Akretion (http://www.akretion.com) -# Copyright 2009-2016 Noviat (http://www.noviat.com) +# Copyright 2011-2020 Akretion (http://www.akretion.com) +# Copyright 2009-2020 Noviat (http://www.noviat.com) # @author Alexis de Lattre # @author Luc de Meyer # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/product_harmonized_system/readme/DESCRIPTION.rst b/product_harmonized_system/readme/DESCRIPTION.rst index 2481baa..10aa1e8 100644 --- a/product_harmonized_system/readme/DESCRIPTION.rst +++ b/product_harmonized_system/readme/DESCRIPTION.rst @@ -1,7 +1,7 @@ -This module contains the objects for Harmonised System Codes (H.S. codes). The full nomenclature is available from the `World Customs Organisation `. These code are usually required on the Proforma invoices that are attached to the packages that are shipped abroad. +This module contains the objects for Harmonised System Codes (H.S. codes). The full nomenclature is available from the `World Customs Organisation `. These codes are usually required on the Proforma invoices that are attached to the packages that are shipped abroad. -This module also handle the local/national extensions to the H.S. codes. The import of the full nomenclature is not provided by this module ; it should be provided by localization modules. +This module also handles the local/national extensions to the H.S. codes. The import of the full nomenclature is not provided by this module; it should be provided by localization modules. -You will also be able to configure the country of origin of a product, which is often required on the proforma invoice for the customs. +You will also be able to configure the *country of origin* of a product, which is often required on the proforma invoice for the customs. This module should be usefull for all companies that export physical goods abroad. This module is also used by the Intrastat modules for the European Union, cf the *intrastat_product* module. diff --git a/product_harmonized_system/readme/USAGE.rst b/product_harmonized_system/readme/USAGE.rst index 7d955cd..f3b64a5 100644 --- a/product_harmonized_system/readme/USAGE.rst +++ b/product_harmonized_system/readme/USAGE.rst @@ -1,3 +1,3 @@ As this module only depends on the *product* module and that module doesn't provide any menu entry, this module lacks a menu entry for H.S. Codes. A menu entry for H.S. codes is provided by the module *product_harmonized_system_stock*. -Once the H.S. codes are created, you will be able to set the H.S. code on an product (under the *Information* tab) or on a product category. On the product form, you will also be able to set the *Country of Origin* of a product (for example, if the product is *made in China*, select *China* as *Country of Origin*). +Once the H.S. codes are created, you will be able to set the H.S. code on a product (under the *Information* tab) or on a product category. On the product form, you will also be able to set the *Country of Origin* of a product (for example, if the product is *made in China*, select *China* as *Country of Origin*). diff --git a/product_harmonized_system/views/hs_code.xml b/product_harmonized_system/views/hs_code.xml index 4b0316c..3672f13 100644 --- a/product_harmonized_system/views/hs_code.xml +++ b/product_harmonized_system/views/hs_code.xml @@ -1,6 +1,6 @@ @@ -73,7 +73,7 @@ - Product Categs + Product Categs diff --git a/product_harmonized_system/views/product_category.xml b/product_harmonized_system/views/product_category.xml index eb58029..0017f94 100644 --- a/product_harmonized_system/views/product_category.xml +++ b/product_harmonized_system/views/product_category.xml @@ -1,6 +1,6 @@ @@ -12,7 +12,7 @@ - + diff --git a/product_harmonized_system/views/product_template.xml b/product_harmonized_system/views/product_template.xml index 1907d8d..8cdfd2e 100644 --- a/product_harmonized_system/views/product_template.xml +++ b/product_harmonized_system/views/product_template.xml @@ -1,6 +1,6 @@