diff --git a/sf_dlm/models/product_template.py b/sf_dlm/models/product_template.py index f9825c88..a2d848c2 100644 --- a/sf_dlm/models/product_template.py +++ b/sf_dlm/models/product_template.py @@ -10,6 +10,7 @@ class ResProductTemplate(models.Model): model_name = fields.Char('模型名称') categ_type = fields.Selection( [("成品", "成品"), ("胚料", "胚料"), ("原材料", "原材料")], string='产品的类别', related='categ_id.type', store=True) + blank_type = fields.Selection([('圆料', '圆料'), ('方料', '方料')], string='坯料分类') model_long = fields.Float('模型长[mm]', digits=(16, 3)) model_width = fields.Float('模型宽[mm]', digits=(16, 3)) model_height = fields.Float('模型高[mm]', digits=(16, 3)) @@ -74,6 +75,7 @@ class ResProductTemplate(models.Model): attachment = self.attachment_create(item['model_name'], item['model_data']) vals = { 'name': '%s-%s-%s' % ('P', order_id.name, i), + 'blank_type': item.get('blank_type'), 'model_long': item['model_long'] + model_type.embryo_tolerance, 'model_width': item['model_width'] + model_type.embryo_tolerance, 'model_height': item['model_height'] + model_type.embryo_tolerance, diff --git a/sf_dlm_management/views/product_template_management_view.xml b/sf_dlm_management/views/product_template_management_view.xml index 672251e4..bb9904a7 100644 --- a/sf_dlm_management/views/product_template_management_view.xml +++ b/sf_dlm_management/views/product_template_management_view.xml @@ -95,7 +95,7 @@ -