去掉客户部分字段必填校验和返工报废代码
This commit is contained in:
@@ -996,15 +996,15 @@ class ResMrpWorkOrder(models.Model):
|
||||
record.write({
|
||||
'date_planned_finished': tem_date_planned_finished # 保持原值
|
||||
})
|
||||
if record.routing_type == 'CNC加工':
|
||||
record.write({
|
||||
'date_finished': tem_date_finished # 保持原值
|
||||
})
|
||||
if record.routing_type == 'CNC加工' and record.test_results in ['返工', '报废']:
|
||||
record.production_id.action_cancel()
|
||||
record.production_id.workorder_ids.write({'rfid_code': False, 'rfid_code_old': record.rfid_code})
|
||||
if record.is_remanufacture is True:
|
||||
record.recreateManufacturingOrWorkerOrder()
|
||||
# if record.routing_type == 'CNC加工':
|
||||
# record.write({
|
||||
# 'date_finished': tem_date_finished # 保持原值
|
||||
# })
|
||||
# if record.routing_type == 'CNC加工' and record.test_results in ['返工', '报废']:
|
||||
# record.production_id.action_cancel()
|
||||
# record.production_id.workorder_ids.write({'rfid_code': False, 'rfid_code_old': record.rfid_code})
|
||||
# if record.is_remanufacture is True:
|
||||
# record.recreateManufacturingOrWorkerOrder()
|
||||
is_production_id = True
|
||||
for workorder in record.production_id.workorder_ids:
|
||||
if workorder.state != 'done':
|
||||
|
||||
Reference in New Issue
Block a user