From eb2851391baf302db36978df4944493b2ae214ba Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Tue, 25 Jun 2024 12:06:28 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A4=84=E7=90=86"=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E7=9A=84=E4=BA=8C=E7=BB=B4=E7=A0=81=E4=BF=A1=E6=81=AF=E4=B8=8E?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E7=9A=84=E4=BA=8C=E7=BB=B4=E7=A0=81=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=B8=8D=E4=B8=80=E8=87=B4"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_warehouse/models/model.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sf_warehouse/models/model.py b/sf_warehouse/models/model.py index 34fa57fe..ea39b757 100644 --- a/sf_warehouse/models/model.py +++ b/sf_warehouse/models/model.py @@ -622,6 +622,11 @@ class SfStockMoveLine(models.Model): if not qr_code_data: raise UserError("没有找到二维码数据。") lot_name = self.lot_name + + # 增加"当为坯料时,只打印序列号的前面部分" + if self.lot_name: # 确保 lot_name 存在 + if self.product_id.categ_id.name == '坯料': + lot_name = lot_name.split('[', 1)[0] # host = "192.168.50.110" # 可以根据实际情况修改 # port = 9100 # 可以根据实际情况修改 @@ -1184,6 +1189,12 @@ class CustomStockMove(models.Model): # todo 待控制 if not lot_name: raise ValidationError("请先分配序列号") + + # 增加"当为坯料时,只打印序列号的前面部分" + if record.lot_name: # 确保 lot_name 存在 + if record.product_id.categ_id.name == '坯料': + lot_name = lot_name.split('[', 1)[0] + # host = "192.168.50.110" # 可以根据实际情况修改 # port = 9100 # 可以根据实际情况修改 From 35ac51bc10f17d26f375259172b8cd858a552250 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Tue, 25 Jun 2024 14:22:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8F=96=E6=B6=88=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=88=86=E7=BB=84=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_plan/views/view.xml | 3 ++- sf_warehouse/models/model.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sf_plan/views/view.xml b/sf_plan/views/view.xml index 02e595f7..065c97c4 100644 --- a/sf_plan/views/view.xml +++ b/sf_plan/views/view.xml @@ -268,7 +268,8 @@ ir.actions.act_window sf.production.plan tree,gantt,form - {'search_default_group_by_state': 1, 'search_default_draft': 1, 'display_complete': True} + + {'search_default_draft': 1, 'display_complete': True} Date: Tue, 25 Jun 2024 16:50:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=94=BE=E5=87=BA=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_machine_connect/views/compensation.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sf_machine_connect/views/compensation.xml b/sf_machine_connect/views/compensation.xml index 07173c17..7668d818 100644 --- a/sf_machine_connect/views/compensation.xml +++ b/sf_machine_connect/views/compensation.xml @@ -5,10 +5,10 @@ mrp.workorder - - - - + --> +