diff --git a/product_harmonized_system/__manifest__.py b/product_harmonized_system/__manifest__.py
index 8aa90ed..cb18a9d 100644
--- a/product_harmonized_system/__manifest__.py
+++ b/product_harmonized_system/__manifest__.py
@@ -9,7 +9,7 @@
{
"name": "Product Harmonized System Codes",
- "version": "13.0.1.0.0",
+ "version": "13.0.1.0.1",
"category": "Reporting",
"license": "AGPL-3",
"summary": "Base module for Product Import/Export reports",
diff --git a/product_harmonized_system/demo/product_demo.xml b/product_harmonized_system/demo/product_demo.xml
index 423f67d..83022b8 100644
--- a/product_harmonized_system/demo/product_demo.xml
+++ b/product_harmonized_system/demo/product_demo.xml
@@ -1,75 +1,60 @@
-
+
-
-
-
-
- 84715000
- Automatic data-processing machines (computers)
-
-
-
- 84717050
- Storage units
-
-
-
- 85340090
- Printed circuits
-
-
-
-
-
- 8.7
-
-
-
-
-
- 1.1
-
-
-
-
-
- 8.2
-
-
-
-
-
- 0.01
-
-
-
-
-
- 0.67
-
-
-
-
-
- 1.05
-
-
-
-
-
- 0.3
-
-
-
-
-
- 3.3
-
-
-
+
+ 84715000
+ Automatic data-processing machines (computers)
+
+
+ 84717050
+ Storage units
+
+
+ 85340090
+ Printed circuits
+
+
+
+
+ 8.7
+
+
+
+
+ 1.1
+
+
+
+
+ 8.2
+
+
+
+
+ 0.01
+
+
+
+
+ 0.67
+
+
+
+
+ 1.05
+
+
+
+
+ 0.3
+
+
+
+
+ 3.3
+
diff --git a/product_harmonized_system/models/hs_code.py b/product_harmonized_system/models/hs_code.py
index fab4283..b2ee7c8 100644
--- a/product_harmonized_system/models/hs_code.py
+++ b/product_harmonized_system/models/hs_code.py
@@ -36,7 +36,7 @@ class HSCode(models.Model):
string="Company",
readonly=True,
required=True,
- default=lambda self: self.env["res.company"]._company_default_get(),
+ default=lambda self: self._default_company_id(),
)
product_categ_ids = fields.One2many(
comodel_name="product.category",
@@ -53,6 +53,10 @@ class HSCode(models.Model):
product_categ_count = fields.Integer(compute="_compute_product_categ_count")
product_tmpl_count = fields.Integer(compute="_compute_product_tmpl_count")
+ @api.model
+ def _default_company_id(self):
+ return self.env.company
+
@api.depends("local_code")
def _compute_hs_code(self):
for this in self:
diff --git a/product_harmonized_system/security/product_hs_security.xml b/product_harmonized_system/security/product_hs_security.xml
index c7da6fb..fc1a5e0 100644
--- a/product_harmonized_system/security/product_hs_security.xml
+++ b/product_harmonized_system/security/product_hs_security.xml
@@ -1,10 +1,10 @@
-
+
-
- HS Code Company rule
-
- ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]
+ HS Code Company rule
+
+ ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]
-
diff --git a/product_harmonized_system/views/hs_code.xml b/product_harmonized_system/views/hs_code.xml
index 93a5e46..1841ced 100644
--- a/product_harmonized_system/views/hs_code.xml
+++ b/product_harmonized_system/views/hs_code.xml
@@ -1,39 +1,41 @@
-
+
-
-
- hs.code.search
- hs.code
-
-
-
-
-
-
+ hs.code.search
+ hs.code
+
+
+
+
+
+
-
- hs.code.tree
- hs.code
-
-
-
-
-
-
-
-
+ hs.code.tree
+ hs.code
+
+
+
+
+
+
+
+
-
Product Categories
@@ -41,63 +43,73 @@
tree,form
[('hs_code_id', '=', active_id)]
-
Products
product.template
kanban,tree,form
[('hs_code_id', '=', active_id)]
-
- hs.code.form
- hs.code
-
-
-
+ hs.code.form
+ hs.code
+
+
+
-
- H.S. Codes
- hs.code
- tree,form
+ H.S. Codes
+ hs.code
+ tree,form
-
-
diff --git a/product_harmonized_system/views/product_category.xml b/product_harmonized_system/views/product_category.xml
index 419f2e0..eb58029 100644
--- a/product_harmonized_system/views/product_category.xml
+++ b/product_harmonized_system/views/product_category.xml
@@ -1,24 +1,21 @@
-
+
-
-
- hs_code.product.category.form
- product.category
-
-
-
-
-
-
-
-
+ hs_code.product.category.form
+ product.category
+
+
+
+
+
+
+
+
-
diff --git a/product_harmonized_system/views/product_template.xml b/product_harmonized_system/views/product_template.xml
index b382e8c..1907d8d 100644
--- a/product_harmonized_system/views/product_template.xml
+++ b/product_harmonized_system/views/product_template.xml
@@ -1,23 +1,26 @@
-
+
-
-
- hs_code.product.template.form
- product.template
-
-
-
-
-
+ hs_code.product.template.form
+ product.template
+
+
+
+
+
+
-
-