[MIG] product_harmonized_system_delivery to v16

This commit is contained in:
Alexis de Lattre
2022-12-27 01:05:22 +01:00
committed by Andreu Orensanz
parent 905c2cc79f
commit 9be35c65a7
4 changed files with 7 additions and 1 deletions

View File

@@ -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",

View File

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

View File

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

View File

@@ -14,6 +14,9 @@
<field name="hs_code" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="country_of_origin" position="attributes">
<attribute name="invisible">1</attribute>
</field>
</field>
</record>
</odoo>