处理特殊表面工艺采购单确认报错的问题
This commit is contained in:
@@ -99,7 +99,7 @@ class PurchaseOrder(models.Model):
|
||||
res = super(PurchaseOrder, self).button_confirm()
|
||||
for line in self.order_line:
|
||||
# 将产品不追踪序列号的行项目设置qty_done
|
||||
if line.move_ids[0].product_id.tracking == 'none':
|
||||
if line.move_ids and line.move_ids[0].product_id.tracking == 'none':
|
||||
line.move_ids[0].quantity_done = line.move_ids[0].product_qty
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user