工单展示组件
This commit is contained in:
@@ -153,7 +153,8 @@ class ResMrpWorkOrder(models.Model):
|
||||
'date_planned_start': False,
|
||||
'date_planned_finished': False,
|
||||
'duration_expected': 60,
|
||||
'duration': 0
|
||||
'duration': 0,
|
||||
|
||||
}]
|
||||
return workorders_values_str
|
||||
|
||||
@@ -389,7 +390,8 @@ class ResMrpWorkOrder(models.Model):
|
||||
'date_planned_start': False,
|
||||
'date_planned_finished': False,
|
||||
'duration_expected': 60,
|
||||
'duration': 0
|
||||
'duration': 0,
|
||||
|
||||
}]
|
||||
return workorders_values_str
|
||||
|
||||
@@ -399,6 +401,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
if self.routing_type == '装夹':
|
||||
self.pro_code = self.production_id.move_raw_ids[0].move_line_ids[0].lot_id.name
|
||||
if self.state == 'waiting' or self.state == 'ready' or self.state == 'progress':
|
||||
self.move_raw_ids = self.production_id.move_raw_ids
|
||||
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)):
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user