diff --git a/dev/scripts/interfaces/sst10_create_product.py b/dev/scripts/interfaces/sst10_create_product.py index e5c012c0..e4bb2d83 100755 --- a/dev/scripts/interfaces/sst10_create_product.py +++ b/dev/scripts/interfaces/sst10_create_product.py @@ -16,6 +16,7 @@ values = { "length": 45.01, "width": 13.45, "thickness": 33.44, + "height": 88.37, "surface": "m", "weight": 80.45, "active": True, diff --git a/ext/custom-addons/dp_custom/models/product.py b/ext/custom-addons/dp_custom/models/product.py index 9bd88a62..2f66255e 100644 --- a/ext/custom-addons/dp_custom/models/product.py +++ b/ext/custom-addons/dp_custom/models/product.py @@ -45,7 +45,8 @@ class ProductTemplate(models.Model): length = fields.Float(string='Länge in mm') width = fields.Float(string='Breite in mm') - thickness = fields.Float(string='Ficke in mm', help='Echte Dicke in mm') + thickness = fields.Float(string='Dicke in mm', help='Echte Dicke in mm') + height = fields.Float(string='Höhe in mm') surface = fields.Selection(SURFACE_OPTIONS, string='Oberfläche') is_internal = fields.Boolean() xcat_id = fields.Many2one(comodel_name='product.xcategory', string='X-Kategorie') @@ -106,4 +107,11 @@ class ProductTemplate(models.Model): @api.model def _get_specified_fields(self): return ['default_code', 'name', 'length', 'width', 'thickness', 'surface', 'active', 'weight', 'is_internal', - 'xcat_id', 'notes', 'material_type_id', 'intrastat_id', 'sale_ok', 'assembly_line_ids', 'list_price'] + 'xcat_id', 'notes', 'material_type_id', 'intrastat_id', 'sale_ok', 'assembly_line_ids', 'list_price', + 'height'] + + +class ProductCategory(models.Model): + _inherit = 'product.category' + + code = fields.Char(string='Code') diff --git a/ext/custom-addons/dp_custom/views/product_views.xml b/ext/custom-addons/dp_custom/views/product_views.xml index 5c0040dd..704d1968 100644 --- a/ext/custom-addons/dp_custom/views/product_views.xml +++ b/ext/custom-addons/dp_custom/views/product_views.xml @@ -8,6 +8,7 @@