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 @@
+
@@ -34,6 +35,17 @@ + + product_category_form_view + product.category + + + + + + + + product_product_form_view product.product diff --git a/ext/custom-addons/dp_dmi/__manifest__.py b/ext/custom-addons/dp_dmi/__manifest__.py index 51c34b7a..2be8294e 100755 --- a/ext/custom-addons/dp_dmi/__manifest__.py +++ b/ext/custom-addons/dp_dmi/__manifest__.py @@ -34,6 +34,7 @@ 'res.partner.sector.csv', 'report.intrastat.code.csv', 'product.xcategory.csv', + 'product.category.csv', 'material.type.csv', 'res.line.csv', ], diff --git a/ext/custom-addons/dp_dmi/product.category.csv b/ext/custom-addons/dp_dmi/product.category.csv new file mode 100644 index 00000000..a3c0a98e --- /dev/null +++ b/ext/custom-addons/dp_dmi/product.category.csv @@ -0,0 +1,2 @@ +"id","name","code" +"dp_dmi.unique_category_id","Holz","45A3"