From fe8e7f3f35bb5782281a2b6bf0516a8f2361b324 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 27 Dec 2022 01:05:22 +0100 Subject: [PATCH] [MIG] product_harmonized_system_delivery to v16 --- product_harmonized_system_delivery/README.rst | 12 +++++++----- .../__manifest__.py | 2 +- .../product_harmonized_system_delivery.pot | 18 ++++++++++++++++-- .../models/product_template.py | 1 + .../readme/DESCRIPTION.rst | 2 ++ .../static/description/index.html | 7 ++++--- .../views/product_template.xml | 3 +++ 7 files changed, 34 insertions(+), 11 deletions(-) diff --git a/product_harmonized_system_delivery/README.rst b/product_harmonized_system_delivery/README.rst index d399f25..42716ac 100644 --- a/product_harmonized_system_delivery/README.rst +++ b/product_harmonized_system_delivery/README.rst @@ -14,19 +14,21 @@ Product Harmonized System Codes - Delivery :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 + :target: https://github.com/OCA/intrastat-extrastat/tree/16.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 + :target: https://translation.odoo-community.org/projects/intrastat-extrastat-16-0/intrastat-extrastat-16-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 + :target: https://runbot.odoo-community.org/runbot/227/16.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. +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. + **Table of contents** .. contents:: @@ -38,7 +40,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -80,6 +82,6 @@ Current `maintainers `__: |maintainer-alexis-via| |maintainer-luc-demeyer| -This module is part of the `OCA/intrastat-extrastat `_ project on GitHub. +This module is part of the `OCA/intrastat-extrastat `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_harmonized_system_delivery/__manifest__.py b/product_harmonized_system_delivery/__manifest__.py index efe02cc..1ad38b5 100644 --- a/product_harmonized_system_delivery/__manifest__.py +++ b/product_harmonized_system_delivery/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Product Harmonized System Codes - Delivery", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Reporting", "license": "AGPL-3", "summary": "Hide native hs_code field provided by the delivery module", diff --git a/product_harmonized_system_delivery/i18n/product_harmonized_system_delivery.pot b/product_harmonized_system_delivery/i18n/product_harmonized_system_delivery.pot index cbcf235..75f7adf 100644 --- a/product_harmonized_system_delivery/i18n/product_harmonized_system_delivery.pot +++ b/product_harmonized_system_delivery/i18n/product_harmonized_system_delivery.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -19,9 +19,23 @@ msgstr "" msgid "HS Code" msgstr "" +#. module: product_harmonized_system_delivery +#: model:ir.model.fields,field_description:product_harmonized_system_delivery.field_product_product__country_of_origin +#: model:ir.model.fields,field_description:product_harmonized_system_delivery.field_product_template__country_of_origin +msgid "Origin of Goods" +msgstr "" + #. module: product_harmonized_system_delivery #: model:ir.model,name:product_harmonized_system_delivery.model_product_template -msgid "Product Template" +msgid "Product" +msgstr "" + +#. module: product_harmonized_system_delivery +#: model:ir.model.fields,help:product_harmonized_system_delivery.field_product_product__country_of_origin +#: model:ir.model.fields,help:product_harmonized_system_delivery.field_product_template__country_of_origin +msgid "" +"Rules of origin determine where goods originate, i.e. not where they have been shipped from, but where they have been produced or manufactured.\n" +"As such, the ‘origin’ is the 'economic nationality' of goods traded in commerce." msgstr "" #. module: product_harmonized_system_delivery diff --git a/product_harmonized_system_delivery/models/product_template.py b/product_harmonized_system_delivery/models/product_template.py index fd0b144..54542fd 100644 --- a/product_harmonized_system_delivery/models/product_template.py +++ b/product_harmonized_system_delivery/models/product_template.py @@ -8,3 +8,4 @@ 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/DESCRIPTION.rst b/product_harmonized_system_delivery/readme/DESCRIPTION.rst index ecd76ab..83b0a72 100644 --- a/product_harmonized_system_delivery/readme/DESCRIPTION.rst +++ b/product_harmonized_system_delivery/readme/DESCRIPTION.rst @@ -1 +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/index.html b/product_harmonized_system_delivery/static/description/index.html index 08967f9..ae33f32 100644 --- a/product_harmonized_system_delivery/static/description/index.html +++ b/product_harmonized_system_delivery/static/description/index.html @@ -367,8 +367,9 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

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.

Table of contents

    @@ -386,7 +387,7 @@ ul.auto-toc {

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

    +feedback.

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

@@ -413,7 +414,7 @@ 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.

+

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 index 44566bb..75cba2a 100644 --- a/product_harmonized_system_delivery/views/product_template.xml +++ b/product_harmonized_system_delivery/views/product_template.xml @@ -14,6 +14,9 @@ 1 + + 1 +