增加工单模型展示,工单物料增加长宽高值
This commit is contained in:
@@ -104,7 +104,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
cnc_ids = fields.One2many("sf.cnc.processing", 'workorder_id', string="CNC加工程序")
|
cnc_ids = fields.One2many("sf.cnc.processing", 'workorder_id', string="CNC加工程序")
|
||||||
cmm_ids = fields.One2many("sf.cmm.program", 'workorder_id', string="CMM程序")
|
cmm_ids = fields.One2many("sf.cmm.program", 'workorder_id', string="CMM程序")
|
||||||
tray_code = fields.Char(string="托盘编码")
|
tray_code = fields.Char(string="托盘编码")
|
||||||
glb_file = fields.Binary("glb模型文件")
|
glb_file = fields.Binary("glb模型文件", related='production_id.model_file')
|
||||||
is_subcontract = fields.Boolean(string='是否外协')
|
is_subcontract = fields.Boolean(string='是否外协')
|
||||||
surface_technics_parameters_id = fields.Many2one('sf.production.process.parameter', string="表面工艺可选参数")
|
surface_technics_parameters_id = fields.Many2one('sf.production.process.parameter', string="表面工艺可选参数")
|
||||||
picking_in_id = fields.Many2one('stock.picking', string='外协入库单')
|
picking_in_id = fields.Many2one('stock.picking', string='外协入库单')
|
||||||
@@ -719,6 +719,12 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
picking_out.write({'state': 'assigned'})
|
picking_out.write({'state': 'assigned'})
|
||||||
if self.state == 'waiting' or self.state == 'ready' or self.state == 'progress':
|
if self.state == 'waiting' or self.state == 'ready' or self.state == 'progress':
|
||||||
self.move_raw_ids = self.production_id.move_raw_ids
|
self.move_raw_ids = self.production_id.move_raw_ids
|
||||||
|
self.move_raw_ids[0].write({
|
||||||
|
'materiel_length': self.move_raw_ids[0].product_id.length,
|
||||||
|
'materiel_width': self.move_raw_ids[0].product_id.width,
|
||||||
|
'materiel_height': self.move_raw_ids[0].product_id.height
|
||||||
|
})
|
||||||
|
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
if any(not time.date_end for time in self.time_ids.filtered(lambda t: t.user_id.id == self.env.user.id)):
|
if any(not time.date_end for time in self.time_ids.filtered(lambda t: t.user_id.id == self.env.user.id)):
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user