1.修复表面工艺工单完成报错2.外协位置改为供应商位置3.采购总监添加创建制造订单权限

This commit is contained in:
jinling.yang
2024-05-17 16:26:15 +08:00
parent 27b5e92563
commit 2dc9866735
3 changed files with 26 additions and 25 deletions

View File

@@ -911,9 +911,10 @@ class ResMrpWorkOrder(models.Model):
})
tem_date_planned_finished = record.date_planned_finished
super().button_finish()
record.write({
'date_planned_finished': tem_date_planned_finished # 保持原值
})
if record.routing_type != '表面工艺':
record.write({
'date_planned_finished': tem_date_planned_finished # 保持原值
})
is_production_id = True
for workorder in record.production_id.workorder_ids:
if workorder.state != 'done':