采购单合并后确认工单外协工序为就绪问题

This commit is contained in:
liaodanlong
2025-01-10 11:08:45 +08:00
parent 5e8a69e252
commit a6c8cd8784

View File

@@ -393,7 +393,7 @@ class RePurchaseOrder(models.Model):
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)])
production = self.env['mrp.production'].search([('name', '=', production_name.strip())])
for workorder in production.workorder_ids.filtered(
lambda wd: wd.routing_type == '表面工艺' and wd.state == 'waiting' and line.product_id.server_product_process_parameters_id == wd.surface_technics_parameters_id):
workorder.state = 'ready'