From a927d0e9cbbd8eb0aba82323465f760de71a92f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Fri, 29 Nov 2024 10:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8D=95=E4=B8=AA=E5=88=B6?= =?UTF-8?q?=E9=80=A0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jikimo_sale_multiple_supply_methods/models/sale_order.py | 2 ++ sf_manufacturing/models/product_template.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/jikimo_sale_multiple_supply_methods/models/sale_order.py b/jikimo_sale_multiple_supply_methods/models/sale_order.py index b7e25835..a56721a2 100644 --- a/jikimo_sale_multiple_supply_methods/models/sale_order.py +++ b/jikimo_sale_multiple_supply_methods/models/sale_order.py @@ -43,6 +43,8 @@ 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 order_id = self product = line.product_id diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index fb6f92ce..460fd994 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -884,7 +884,7 @@ class ResProductMo(models.Model): 'model_process_parameters_ids': [(6, 0, [])] if not item.get( 'process_parameters_code') else self.get_process_parameters_id(item['process_parameters_code']), 'model_remark': item['remark'], - 'single_manufacturing': False, + 'single_manufacturing': True, 'default_code': '%s-%s' % (order_number, i), 'manual_quotation': item['manual_quotation'] or False, 'part_number': item.get('part_number') or '',