From 2bf43ae9a1c9cf901338b30863195ba1997adee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Wed, 7 May 2025 08:47:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E6=88=90=E5=93=81=E7=9A=84=E8=BF=BD?= =?UTF-8?q?=E6=BA=AF=E5=A4=8D=E5=88=B6=E5=88=B0product=E4=B8=8A=EF=BC=8C?= =?UTF-8?q?=E5=B0=86=E5=9D=AF=E6=96=99=E7=9A=84=E8=BF=BD=E6=BA=AF=E5=90=8C?= =?UTF-8?q?=E6=88=90=E5=93=81=E7=9A=84=E8=BF=BD=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/product_template.py | 1 + sf_manufacturing/models/sale_order.py | 1 + 2 files changed, 2 insertions(+) diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index 41637123..775df50e 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -1030,6 +1030,7 @@ class ResProductMo(models.Model): 'single_manufacturing': product_id.single_manufacturing, 'is_bfm': True, 'active': True, + 'tracking': finish_product.tracking, # 坯料的跟踪方式跟随成品 } # 外协和采购生成的坯料需要根据材料型号绑定供应商 if route_type == 'subcontract' or route_type == 'purchase': diff --git a/sf_manufacturing/models/sale_order.py b/sf_manufacturing/models/sale_order.py index c8cc129d..4ce8750c 100644 --- a/sf_manufacturing/models/sale_order.py +++ b/sf_manufacturing/models/sale_order.py @@ -59,6 +59,7 @@ class SaleOrder(models.Model): line.product_id.product_tmpl_id.copy_template(product_template_id) # 将模板上的single_manufacturing属性复制到成品上 line.product_id.single_manufacturing = product_template_id.single_manufacturing + line.product_id.tracking = product_template_id.tracking order_id = self product = line.product_id