处理coding报错

This commit is contained in:
qihao.gong@jikimo.com
2023-11-29 17:34:15 +08:00
parent 5b1d347fd4
commit 893aa2111c
3 changed files with 210 additions and 210 deletions

View File

@@ -480,7 +480,7 @@ class ResMrpWorkOrder(models.Model):
# 重写工单开始按钮方法
def button_start(self):
if self.routing_type == '装夹':
if self.routing_type == '装夹' and self.production_id.move_raw_ids[0].move_line_ids[0].lot_id.name:
self.pro_code = self.production_id.move_raw_ids[0].move_line_ids[0].lot_id.name
# 外协出库单,从“正在等待”变为“就绪”状态
if self.is_subcontract is True: