diff --git a/product_harmonized_system/README.rst b/product_harmonized_system/README.rst new file mode 100644 index 0000000..bf78274 --- /dev/null +++ b/product_harmonized_system/README.rst @@ -0,0 +1,106 @@ +=============================== +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/15.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-15-0/intrastat-extrastat-15-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/15.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 codes are usually required on the Proforma invoices that are attached to the packages that are shipped abroad. + +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. + +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 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*). + +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. + +.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px + :target: https://github.com/alexis-via + :alt: alexis-via +.. |maintainer-luc-demeyer| image:: https://github.com/luc-demeyer.png?size=40px + :target: https://github.com/luc-demeyer + :alt: luc-demeyer + +Current `maintainers `__: + +|maintainer-alexis-via| |maintainer-luc-demeyer| + +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..d33ac4d --- /dev/null +++ b/product_harmonized_system/__manifest__.py @@ -0,0 +1,31 @@ +# 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) +# Copyright 2022 Tecnativa - Víctor Martínez +# @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": "15.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": [ + "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..902f4a8 --- /dev/null +++ b/product_harmonized_system/demo/product_demo.xml @@ -0,0 +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 + + diff --git a/product_harmonized_system/i18n/es.po b/product_harmonized_system/i18n/es.po new file mode 100644 index 0000000..2ad55fc --- /dev/null +++ b/product_harmonized_system/i18n/es.po @@ -0,0 +1,254 @@ +# 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: 2021-02-21 14:45+0000\n" +"Last-Translator: Mat-moran \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 4.3.2\n" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid "Product Categs" +msgstr "Categorías de 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_state_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__origin_state_id +msgid "Country State of Origin" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_product__origin_state_id +#: model:ir.model.fields,help:product_harmonized_system.field_product_template__origin_state_id +msgid "" +"Country State of origin of the product.\n" +"This field is used for the Intrastat declaration, selecting one of the " +"Northern Ireland counties will set the code 'XI' for products from the " +"United Kingdom whereas code 'XU' will be used for the other UK counties." +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 "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 +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__display_name +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__display_name +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__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 +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.product_template_search_view +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 "" +"Sistema de códigos armonizado (6 dígitos). Lista completa disponible de la " +"World Customs Organisation, ver http://www.wcoomd.org" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__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 "" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code____last_update +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category____last_update +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product____last_update +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template____last_update +msgid "Last Modified on" +msgstr "Última modificación" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__write_date +msgid "Last Updated on" +msgstr "Última actualización" + +#. 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 "Producto" + +#. 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 "Categorías de producto" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_category +msgid "Product Category" +msgstr "Categoría de producto" + +#. 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 "Productos" + +#. 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 "Descripciones cortas de las categorías H.S." + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.84717050 +msgid "Storage units" +msgstr "Unidades de almacenamiento" + +#. module: product_harmonized_system +#: 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 new file mode 100644 index 0000000..46d0da4 --- /dev/null +++ b/product_harmonized_system/i18n/fr.po @@ -0,0 +1,255 @@ +# 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: 2021-07-04 21:48+0000\n" +"Last-Translator: Alexis de Lattre \n" +"Language-Team: \n" +"Language: fr\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 4.3.2\n" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid "Product Categs" +msgstr "Catégories d'article" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_form +msgid "Products" +msgstr "Articles" + +#. 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 "Archivés" + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.84715000 +msgid "Automatic data-processing machines (computers)" +msgstr "Machines de traitement automatique de l'information (ordinateurs)" + +#. 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 "" +"Code utilisé pour la déclaration nationale d'import/export. Le code national " +"commence par les 6 chiffres du système harmonisé et est souvent suivi de " +"quelques chiffres supplémentaires pour étendre le système harmonisé." + +#. 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_state_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__origin_state_id +msgid "Country State of Origin" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_product__origin_state_id +#: model:ir.model.fields,help:product_harmonized_system.field_product_template__origin_state_id +msgid "" +"Country State of origin of the product.\n" +"This field is used for the Intrastat declaration, selecting one of the " +"Northern Ireland counties will set the code 'XI' for products from the " +"United Kingdom whereas code 'XU' will be used for the other UK counties." +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 "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 "Pays d'origine de l'article i.e. article 'made in ____'." + +#. 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 +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__display_name +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__display_name +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__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 +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.product_template_search_view +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 +msgid "H.S. Codes" +msgstr "Codes 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 "" +"Code du système harmonisé. Si ce code n'est pas renseigné directement sur " +"l'article, il sera lu ici sur la catégorie d'article associée." + +#. 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 "" +"Code du système harmonisé. La nomenclature est publiée par l'Organisation " +"Mondiale des Douanes, cf http://www.wcoomd.org/. Vous pouvez laisser ce " +"champ vide et renseigner le code S.H. sur la catégorie d'article." + +#. 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 "" +"Code du système harmonisé (6 chiffres). La liste complète est publiée par " +"l'Organisation Mondiale des Douanes, cf http://www.wcoomd.org" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__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 +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category____last_update +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product____last_update +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template____last_update +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 "Circuits imprimés" + +#. module: product_harmonized_system +#: model:ir.model,name:product_harmonized_system.model_product_product +msgid "Product" +msgstr "Article" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_hs_code__product_categ_count +msgid "Product Categ Count" +msgstr "Nombre de catégories d'article" + +#. 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 "Catégories d'article" + +#. 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 +msgid "Product Tmpl Count" +msgstr "Nombre de modèles 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 "Articles" + +#. module: product_harmonized_system +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.hs_code_view_search +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 S.H." + +#. module: product_harmonized_system +#: model:hs.code,description:product_harmonized_system.84717050 +msgid "Storage units" +msgstr "Unités de stockage" + +#. module: product_harmonized_system +#: 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é !" diff --git a/product_harmonized_system/i18n/hr.po b/product_harmonized_system/i18n/hr.po new file mode 100644 index 0000000..f943df9 --- /dev/null +++ b/product_harmonized_system/i18n/hr.po @@ -0,0 +1,243 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_harmonized_system +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-07-01 10:05+0000\n" +"Last-Translator: Bole \n" +"Language-Team: none\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.3.2\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 "Tvrtka" + +#. module: product_harmonized_system +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__origin_state_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__origin_state_id +msgid "Country State of Origin" +msgstr "Regija države porijekla" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_product__origin_state_id +#: model:ir.model.fields,help:product_harmonized_system.field_product_template__origin_state_id +msgid "" +"Country State of origin of the product.\n" +"This field is used for the Intrastat declaration, selecting one of the Northern Ireland counties will set the code 'XI' for products from the United Kingdom whereas code 'XU' will be used for the other UK counties." +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 "Država porijekla" + +#. 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 "Država porijekla proizvoda, nrp: proizvod je 'made in ______'." + +#. 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 +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__display_name +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__display_name +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__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 +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.product_template_search_view +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 +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__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 +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category____last_update +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product____last_update +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template____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 +#: model:ir.model.constraint,message:product_harmonized_system.constraint_hs_code_local_code_company_uniq +msgid "This code already exists for this company !" +msgstr "" 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..43ddf64 --- /dev/null +++ b/product_harmonized_system/i18n/product_harmonized_system.pot @@ -0,0 +1,239 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_harmonized_system +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.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_state_id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__origin_state_id +msgid "Country State of Origin" +msgstr "" + +#. module: product_harmonized_system +#: model:ir.model.fields,help:product_harmonized_system.field_product_product__origin_state_id +#: model:ir.model.fields,help:product_harmonized_system.field_product_template__origin_state_id +msgid "" +"Country State of origin of the product.\n" +"This field is used for the Intrastat declaration, selecting one of the Northern Ireland counties will set the code 'XI' for products from the United Kingdom whereas code 'XU' will be used for the other UK counties." +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 +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__display_name +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__display_name +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__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 +#: model_terms:ir.ui.view,arch_db:product_harmonized_system.product_template_search_view +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 +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category__id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product__id +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template__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 +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_category____last_update +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_product____last_update +#: model:ir.model.fields,field_description:product_harmonized_system.field_product_template____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 +#: model:ir.model.constraint,message:product_harmonized_system.constraint_hs_code_local_code_company_uniq +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..89c1000 --- /dev/null +++ b/product_harmonized_system/models/hs_code.py @@ -0,0 +1,107 @@ +# 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). + +from textwrap import shorten + +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", + default=lambda self: self._default_company_id(), + ) + 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.model + def _default_company_id(self): + return False + + @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 = shorten(name, 55) + 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().create(vals) + + def write(self, vals): + if vals.get("local_code"): + vals["local_code"] = vals["local_code"].replace(" ", "") + return super().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..e9d9750 --- /dev/null +++ b/product_harmonized_system/models/product_category.py @@ -0,0 +1,30 @@ +# 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). + +from odoo import fields, models + + +class ProductCategory(models.Model): + _inherit = "product.category" + + hs_code_id = fields.Many2one( + "hs.code", + string="H.S. Code", + 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..7aa950d --- /dev/null +++ b/product_harmonized_system/models/product_template.py @@ -0,0 +1,50 @@ +# 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). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + hs_code_id = fields.Many2one( + "hs.code", + string="H.S. Code", + 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( + comodel_name="res.country", + string="Country of Origin", + help="Country of origin of the product i.e. product " "'made in ____'.", + ) + origin_state_id = fields.Many2one( + comodel_name="res.country.state", + string="Country State of Origin", + domain="[('country_id', '=?', origin_country_id)]", + help="Country State of origin of the product.\n" + "This field is used for the Intrastat declaration, " + "selecting one of the Northern Ireland counties will set the code 'XI' " + "for products from the United Kingdom whereas code 'XU' " + "will be used for the other UK counties.", + ) + + +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..10aa1e8 --- /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 codes are usually required on the Proforma invoices that are attached to the packages that are shipped abroad. + +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. + +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..f3b64a5 --- /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 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/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..42c7761 --- /dev/null +++ b/product_harmonized_system/security/product_hs_security.xml @@ -0,0 +1,10 @@ + + + + HS Code Company rule + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + 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..52390f9 --- /dev/null +++ b/product_harmonized_system/static/description/index.html @@ -0,0 +1,439 @@ + + + + + + +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 codes are usually required on the Proforma invoices that are attached to the packages that are shipped abroad.

+

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.

+

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 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).

+
+
+

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.

+

Current maintainers:

+

alexis-via luc-demeyer

+

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..9b93a30 --- /dev/null +++ b/product_harmonized_system/views/hs_code.xml @@ -0,0 +1,112 @@ + + + + + + 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..0017f94 --- /dev/null +++ b/product_harmonized_system/views/product_category.xml @@ -0,0 +1,21 @@ + + + + + + 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..79d2b27 --- /dev/null +++ b/product_harmonized_system/views/product_template.xml @@ -0,0 +1,43 @@ + + + + + + hs_code.product.template.form + product.template + + + + + + + + + + + product.template + + + + + + + + diff --git a/setup/product_harmonized_system/odoo/addons/product_harmonized_system b/setup/product_harmonized_system/odoo/addons/product_harmonized_system new file mode 120000 index 0000000..40ab03b --- /dev/null +++ b/setup/product_harmonized_system/odoo/addons/product_harmonized_system @@ -0,0 +1 @@ +../../../../product_harmonized_system \ No newline at end of file diff --git a/setup/product_harmonized_system/setup.py b/setup/product_harmonized_system/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/product_harmonized_system/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)