From a1f0a580a65d5e8cce6e671d86e141c91bb8e75c Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Mon, 29 Apr 2024 17:25:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20=20=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E8=A3=85=E5=A4=B9=E5=B2=97=E5=9C=A8=E5=B7=A5=E4=BB=B6=E8=A3=85?= =?UTF-8?q?=E5=A4=B9=E5=8D=95=E8=AF=A6=E6=83=85=E6=89=AB=E6=8F=8Frfid?= =?UTF-8?q?=E7=A0=81=E6=8A=A5=E9=94=99=20=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 12d7505b..4ad7e2d2 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1006,7 +1006,10 @@ class SfWorkOrderBarcodes(models.Model): # [('routing_type', '=', '装夹预调'), ('rfid_code', '=', barcode)]) workorder_old = self.env['mrp.workorder'].search([('rfid_code', '=', barcode)]) if workorder_old: - raise UserError('该托盘已绑定【%s】制造订单,请先解除绑定!!!' % workorder_old.production_id.name) + name = '' + for workorder in workorder_old: + name = '%s %s' % (name, workorder.production_id.name) + raise UserError('该托盘已绑定【%s】制造订单,请先解除绑定!!!' % name) if workorder: if workorder.routing_type == '装夹预调': if workorder.state in ['done']: