diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index cd449c69..e0449176 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -440,12 +440,12 @@ class ResMrpWorkOrder(models.Model): action['context'] = dict(self._context, default_origin=self.name) return action - @api.depends('state', 'production_id.name') def _compute_surface_technics_purchase_ids(self): for order in self: if order.routing_type == '表面工艺' and order.state not in ['cancel']: - domain = [('group_id', '=', self.production_id.procurement_group_id.id), - ('purchase_type', '=', 'consignment'), ('state', '!=', 'cancel')] + domain = [('purchase_type', '=', 'consignment'), + ('origin', 'like', '%' + self.production_id.name + '%'), + ('state', '!=', 'cancel')] # domain = [('purchase_type', '=', 'consignment'), # ('origin', 'like', '%' + self.production_id.name + '%'), # ('state', '!=', 'cancel')]