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 0000000..3a0328b Binary files /dev/null and b/product_harmonized_system/static/description/icon.png differ 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 + + + + + + + + + +