From 9be35c65a724e45f88e9b8f922129e5cd21f89fc 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/__manifest__.py | 2 +- product_harmonized_system_delivery/models/product_template.py | 1 + product_harmonized_system_delivery/readme/DESCRIPTION.rst | 2 ++ product_harmonized_system_delivery/views/product_template.xml | 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) 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/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/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 +