From a3c0fd3ccf64b7962c78d55a9e06ff5e0c61fe94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Thu, 15 May 2025 16:48:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=B7=A5=E8=89=BA=E5=A4=96?= =?UTF-8?q?=E5=8D=8F=E9=87=87=E8=B4=AD=E5=8D=95=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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')]