解决手工创建表面工艺采购单由于没有源单据报错

This commit is contained in:
胡尧
2024-12-25 11:31:27 +08:00
parent c8df5ed179
commit d82cb1e64c

View File

@@ -370,6 +370,7 @@ class RePurchaseOrder(models.Model):
move_id.put_move_line()
for line in item.order_line:
if line.product_id.categ_type == '表面工艺':
if item.origin:
for production_name in item.origin.split(','):
production = self.env['mrp.production'].search([('name', '=', production_name)])
for workorder in production.workorder_ids.filtered(