diff --git a/sf_sale/models/sale_order.py b/sf_sale/models/sale_order.py index 95ab1ac7..b8115520 100644 --- a/sf_sale/models/sale_order.py +++ b/sf_sale/models/sale_order.py @@ -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'