diff --git a/product_harmonized_system_delivery/README.rst b/product_harmonized_system_delivery/README.rst new file mode 100644 index 0000000..d399f25 --- /dev/null +++ b/product_harmonized_system_delivery/README.rst @@ -0,0 +1,85 @@ +========================================== +Product Harmonized System Codes - Delivery +========================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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_delivery + :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_delivery + :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| + +The OCA module *product_harmonized_system* adds a many2one field *hs_code_id* on product templates that points to an *H.S. Code* object. But the *delivery* module from the official addons adds a char field *hs_code* on product templates, which has the same purpose, but we can't use it because we need structured data for H.S. codes. This module hides the *hs_code* field added by the *delivery* module, to avoid confusion. + +**Table of contents** + +.. contents:: + :local: + +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 +~~~~~~~ + +* Akretion + +Contributors +~~~~~~~~~~~~ + +* Alexis de Lattre +* Guewen Baconnier + +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_delivery/__init__.py b/product_harmonized_system_delivery/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/product_harmonized_system_delivery/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_harmonized_system_delivery/__manifest__.py b/product_harmonized_system_delivery/__manifest__.py new file mode 100644 index 0000000..1ad38b5 --- /dev/null +++ b/product_harmonized_system_delivery/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2018-2022 Akretion France (http://www.akretion.com) +# @author Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Product Harmonized System Codes - Delivery", + "version": "16.0.1.0.0", + "category": "Reporting", + "license": "AGPL-3", + "summary": "Hide native hs_code field provided by the delivery module", + "author": "Akretion, Odoo Community Association (OCA)", + "maintainers": ["alexis-via", "luc-demeyer"], + "website": "https://github.com/OCA/intrastat-extrastat", + "depends": ["delivery", "product_harmonized_system"], + "data": ["views/product_template.xml"], + "installable": True, + "auto_install": True, +} diff --git a/product_harmonized_system_delivery/i18n/es.po b/product_harmonized_system_delivery/i18n/es.po new file mode 100644 index 0000000..c7831da --- /dev/null +++ b/product_harmonized_system_delivery/i18n/es.po @@ -0,0 +1,18 @@ +#. module: product_harmonized_system_delivery +#: model:ir.model.fields,field_description:product_harmonized_system_delivery.field_product_product__hs_code +#: model:ir.model.fields,field_description:product_harmonized_system_delivery.field_product_template__hs_code +msgid "HS Code" +msgstr "" + +#. module: product_harmonized_system_delivery +#: model:ir.model,name:product_harmonized_system_delivery.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_harmonized_system_delivery +#: model:ir.model.fields,help:product_harmonized_system_delivery.field_product_product__hs_code +#: model:ir.model.fields,help:product_harmonized_system_delivery.field_product_template__hs_code +msgid "" +"Standardized code for international shipping and goods declaration. At the " +"moment, only used for the FedEx shipping provider." +msgstr "" diff --git a/product_harmonized_system_delivery/i18n/product_harmonized_system_delivery.pot b/product_harmonized_system_delivery/i18n/product_harmonized_system_delivery.pot new file mode 100644 index 0000000..cbcf235 --- /dev/null +++ b/product_harmonized_system_delivery/i18n/product_harmonized_system_delivery.pot @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_harmonized_system_delivery +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.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_delivery +#: model:ir.model.fields,field_description:product_harmonized_system_delivery.field_product_product__hs_code +#: model:ir.model.fields,field_description:product_harmonized_system_delivery.field_product_template__hs_code +msgid "HS Code" +msgstr "" + +#. module: product_harmonized_system_delivery +#: model:ir.model,name:product_harmonized_system_delivery.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_harmonized_system_delivery +#: model:ir.model.fields,help:product_harmonized_system_delivery.field_product_product__hs_code +#: model:ir.model.fields,help:product_harmonized_system_delivery.field_product_template__hs_code +msgid "" +"Standardized code for international shipping and goods declaration. At the " +"moment, only used for the FedEx shipping provider." +msgstr "" diff --git a/product_harmonized_system_delivery/models/__init__.py b/product_harmonized_system_delivery/models/__init__.py new file mode 100644 index 0000000..e8fa8f6 --- /dev/null +++ b/product_harmonized_system_delivery/models/__init__.py @@ -0,0 +1 @@ +from . import product_template diff --git a/product_harmonized_system_delivery/models/product_template.py b/product_harmonized_system_delivery/models/product_template.py new file mode 100644 index 0000000..54542fd --- /dev/null +++ b/product_harmonized_system_delivery/models/product_template.py @@ -0,0 +1,11 @@ +# Copyright 2017-2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + hs_code = fields.Char(related="hs_code_id.hs_code", store=True) + country_of_origin = fields.Many2one(related="origin_country_id", store=True) diff --git a/product_harmonized_system_delivery/readme/CONTRIBUTORS.rst b/product_harmonized_system_delivery/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..4384162 --- /dev/null +++ b/product_harmonized_system_delivery/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Alexis de Lattre +* Guewen Baconnier diff --git a/product_harmonized_system_delivery/readme/DESCRIPTION.rst b/product_harmonized_system_delivery/readme/DESCRIPTION.rst new file mode 100644 index 0000000..83b0a72 --- /dev/null +++ b/product_harmonized_system_delivery/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +The OCA module *product_harmonized_system* adds a many2one field *hs_code_id* on product templates that points to an *H.S. Code* object. But the *delivery* module from the official addons adds a char field *hs_code* on product templates, which has the same purpose, but we can't use it because we need structured data for H.S. codes. This module hides the *hs_code* field added by the *delivery* module, to avoid confusion. + +Since Odoo v16, the *delivery* module also adds a many2one field *country_of_origin*, which is similar to the many2one field *origin_country_id* of the OCA module *product_harmonized_system*. This module also hides the *country_of_origin* field added by the *delivery* module. diff --git a/product_harmonized_system_delivery/static/description/icon.png b/product_harmonized_system_delivery/static/description/icon.png new file mode 100644 index 0000000..3a0328b Binary files /dev/null and b/product_harmonized_system_delivery/static/description/icon.png differ diff --git a/product_harmonized_system_delivery/static/description/index.html b/product_harmonized_system_delivery/static/description/index.html new file mode 100644 index 0000000..08967f9 --- /dev/null +++ b/product_harmonized_system_delivery/static/description/index.html @@ -0,0 +1,422 @@ + + + + + + +Product Harmonized System Codes - Delivery + + + +
+

Product Harmonized System Codes - Delivery

+ + +

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

+

The OCA module product_harmonized_system adds a many2one field hs_code_id on product templates that points to an H.S. Code object. But the delivery module from the official addons adds a char field hs_code on product templates, which has the same purpose, but we can’t use it because we need structured data for H.S. codes. This module hides the hs_code field added by the delivery module, to avoid confusion.

+

Table of contents

+ +
+

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

+
    +
  • Akretion
  • +
+
+
+

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_delivery/views/product_template.xml b/product_harmonized_system_delivery/views/product_template.xml new file mode 100644 index 0000000..75cba2a --- /dev/null +++ b/product_harmonized_system_delivery/views/product_template.xml @@ -0,0 +1,22 @@ + + + + + + hide_native_hs_code_field.product.template.form + product.template + + + + 1 + + + 1 + + + + diff --git a/setup/product_harmonized_system_delivery/odoo/addons/product_harmonized_system_delivery b/setup/product_harmonized_system_delivery/odoo/addons/product_harmonized_system_delivery new file mode 120000 index 0000000..61e2d97 --- /dev/null +++ b/setup/product_harmonized_system_delivery/odoo/addons/product_harmonized_system_delivery @@ -0,0 +1 @@ +../../../../product_harmonized_system_delivery \ No newline at end of file diff --git a/setup/product_harmonized_system_delivery/setup.py b/setup/product_harmonized_system_delivery/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/product_harmonized_system_delivery/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)