修改工单重复,业务平台分配工厂自动生成产品部分新增字段
This commit is contained in:
@@ -14,7 +14,14 @@ class ResProductTemplate(models.Model):
|
||||
model_materials_id = fields.Many2one('mrs.production.materials', string='模型材料')
|
||||
model_materials_type_id = fields.Many2one('mrs.materials.model', string='模型材料型号')
|
||||
model_type_id = fields.Many2one('sf.model.type', string='模型类型')
|
||||
processing_panel = fields.Char('模型加工面板')
|
||||
model_processing_panel = fields.Char('模型加工面板')
|
||||
model_surface_process_id = fields.Many2one('mrs.production.process', string='表面工艺')
|
||||
model_process_parameters_id = fields.Many2one('mrs.processing.technology', string='工艺参数')
|
||||
# price = fields.Float('单价', digits=(16, 3))
|
||||
# number = fields.Integer('数量', default=1)
|
||||
# total_amount = fields.Float('金额', digits=(16, 3), compute='_compute_total_amount')
|
||||
# model_number =
|
||||
|
||||
# 胚料的长,宽,高
|
||||
embryo_long = fields.Float('胚料长[mm]', digits=(16, 3), onchange='count_embryo_size')
|
||||
embryo_width = fields.Float('胚料宽[mm]', digits=(16, 3), onchange='count_embryo_size')
|
||||
@@ -22,6 +29,7 @@ class ResProductTemplate(models.Model):
|
||||
embryo_materials_id = fields.Many2one('mrs.production.materials', string='胚料材料')
|
||||
embryo_materials_type_id = fields.Many2one('mrs.materials.model', string='胚料材料型号')
|
||||
|
||||
|
||||
volume = fields.Float(compute='_compute_volume', store=True)
|
||||
|
||||
@api.depends('embryo_long', 'embryo_width', 'embryo_height')
|
||||
@@ -43,6 +51,11 @@ class ResProductTemplate(models.Model):
|
||||
[('materials_no', '=', item['texture_code'])]).id,
|
||||
'model_materials_type_id': self.env['mrs.materials.model'].search(
|
||||
[('materials_no', '=', item['texture_type_code'])]).id,
|
||||
'model_surface_process_id': self.env['mrs.production.process'].search(
|
||||
[('process_encode', '=', item['surface_process_code'])]).id,
|
||||
'model_process_parameters_id': self.env['mrs.processing.technology'].search(
|
||||
[('process_encode', '=', item['process_parameters_code'])]).id,
|
||||
''
|
||||
'default_code': '%s-%s' % (order_number, i),
|
||||
'barcode': item['barcode'],
|
||||
'active': True
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<field name="model_height" string="高[mm]"/>
|
||||
<field name="model_volume" string="体积[mm]"/>
|
||||
<field name="model_type_id" string="模板类型"/>
|
||||
<field name="processing_panel" placeholder="例如A,B" string="加工面板"/>
|
||||
<field name="model_processing_panel" placeholder="例如A,B" string="加工面板"/>
|
||||
<field name="model_precision" string="精度要求"/>
|
||||
<field name="model_materials_id" string="材料"/>
|
||||
<field name="model_materials_type_id" string="型号"
|
||||
|
||||
Reference in New Issue
Block a user