From ed4903b6f17a8e9f5775c3604efd537af0d7f260 Mon Sep 17 00:00:00 2001
From: mgw <1392924357@qq.com>
Date: Tue, 9 Jul 2024 10:18:13 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E9=99=A4=E8=A3=85=E5=A4=B9=E5=A4=84?=
=?UTF-8?q?=E6=89=93=E5=8D=B0=E6=88=90=E5=93=81=E4=BA=8C=E7=BB=B4=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_manufacturing/models/mrp_workorder.py | 10 ++++++++++
sf_manufacturing/models/stock.py | 1 +
sf_manufacturing/views/mrp_workorder_view.xml | 2 ++
3 files changed, 13 insertions(+)
diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py
index 4b9371c2..16ae67f3 100644
--- a/sf_manufacturing/models/mrp_workorder.py
+++ b/sf_manufacturing/models/mrp_workorder.py
@@ -1093,6 +1093,16 @@ class ResMrpWorkOrder(models.Model):
# logging.info('button_send_program_again error:%s' % e)
# raise UserError("重新下发nc程序失败,请联系管理员")
+ def print_method(self):
+ """
+ 解除装夹处调用关联制造订单的关联序列号的打印方法
+ """
+ if self.production_id:
+ if self.production_id.lot_producing_id:
+ self.production_id.lot_producing_id.print_single_method()
+ else:
+ raise UserError("无关联制造订单或关联序列号,无法打印。请检查!")
+
class CNCprocessing(models.Model):
_name = 'sf.cnc.processing'
diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py
index 9234060f..c6c8ec6b 100644
--- a/sf_manufacturing/models/stock.py
+++ b/sf_manufacturing/models/stock.py
@@ -404,6 +404,7 @@ class ProductionLot(models.Model):
def print_single_method(self):
+ print('self.name========== %s' % self.name)
self.ensure_one()
qr_code_data = self.qr_code_image
if not qr_code_data:
diff --git a/sf_manufacturing/views/mrp_workorder_view.xml b/sf_manufacturing/views/mrp_workorder_view.xml
index dc5b4a56..70cf0448 100644
--- a/sf_manufacturing/views/mrp_workorder_view.xml
+++ b/sf_manufacturing/views/mrp_workorder_view.xml
@@ -165,6 +165,8 @@
+