diff --git a/product_harmonized_system/demo/product_demo.xml b/product_harmonized_system/demo/product_demo.xml index 1713f74..dbc475f 100644 --- a/product_harmonized_system/demo/product_demo.xml +++ b/product_harmonized_system/demo/product_demo.xml @@ -26,64 +26,55 @@ - 8 8.7 - 0.5 1.1 - 7.5 8.2 + + + + 0.01 + + + + + + 0.67 + + - 0.45 - 0.7 - - - - - - 0.42 - 0.67 - - - - - - 0.52 0.75 - 0.6 1.05 - + - 0.65 - 1.1 + 0.3 - 3.3 - 4.6 + 3.3 diff --git a/product_harmonized_system/models/hs_code.py b/product_harmonized_system/models/hs_code.py index d6bac05..580c957 100644 --- a/product_harmonized_system/models/hs_code.py +++ b/product_harmonized_system/models/hs_code.py @@ -23,7 +23,7 @@ class HSCode(models.Model): 'Description', translate=True, help="Short text description of the H.S. category") display_name = fields.Char( - compute='_compute_display_name', string="Display Name", + compute='_compute_display_name_field', string="Display Name", store=True, readonly=True) local_code = fields.Char( string='Local Code', required=True, @@ -48,7 +48,7 @@ class HSCode(models.Model): @api.multi @api.depends('local_code', 'description') - def _compute_display_name(self): + def _compute_display_name_field(self): for this in self: display_name = this.local_code if this.description: