Skip to content

Commit 50cfd1a

Browse files
committed
[MIG] product_harmonized_system: Migration to 19.0
1 parent 0091bb8 commit 50cfd1a

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

product_harmonized_system/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
{
1212
"name": "Product Harmonized System Codes",
13-
"version": "18.0.1.2.0",
13+
"version": "19.0.1.0.0",
1414
"category": "Reporting",
1515
"license": "AGPL-3",
1616
"summary": "Base module for Product Import/Export reports",

product_harmonized_system/models/hs_code.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,10 @@ def _compute_display_name(self):
9797
name = shorten(name, 55)
9898
this.display_name = name
9999

100-
_sql_constraints = [
101-
(
102-
"local_code_company_uniq",
103-
"unique(local_code, company_id)",
104-
"This code already exists for this company !",
105-
)
106-
]
100+
_local_code_company_uniq = models.Constraint(
101+
"unique(local_code, company_id)",
102+
"This code already exists for this company !",
103+
)
107104

108105
@api.model_create_multi
109106
def create(self, vals_list):

product_harmonized_system/views/product_template.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<field name="model">product.template</field>
2727
<field name="inherit_id" ref="product.product_template_search_view" />
2828
<field name="arch" type="xml">
29-
<filter name="categ_id" position="after">
29+
<xpath expr="//filter[@name='group_by_categ_id']" position="after">
3030
<filter
3131
string="H.S. Code"
3232
name="hs_code_groupby"
@@ -37,7 +37,7 @@
3737
name="origin_country_groupby"
3838
context="{'group_by': 'origin_country_id'}"
3939
/>
40-
</filter>
40+
</xpath>
4141
</field>
4242
</record>
4343
</odoo>

0 commit comments

Comments
 (0)