From e50f0c44654c6138fe86db4dceb28d9b9202543e Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Fri, 8 Sep 2023 14:10:48 +0800 Subject: [PATCH] =?UTF-8?q?Merge=20branch=20'develop'=20of=20https://e.cod?= =?UTF-8?q?ing.net/jikimo-hn/jikimo=5Fsfs/jikimo=5Fsf=20into=20feature/?= =?UTF-8?q?=E5=88=80=E6=9F=84=E5=92=8C=E5=A4=B9=E5=A4=B4=E5=8F=8D=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E5=88=B0Cloud=E7=94=9F=E6=88=90=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=88=80=E5=85=B7=E7=89=A9=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Conflicts: # sf_manufacturing/models/product_template.py --- sf_manufacturing/models/product_template.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index 9729d1c9..1d1ed2ba 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -761,8 +761,7 @@ class ResMrpBomMo(models.Model): } return self.env['mrp.bom.line'].create(vals) - # 业务平台分配工厂后在智能工厂先创建销售订单再创建该产品后再次进行创建bom - + # 业务平台分配工厂后在智能工厂先创建销售订单再创建该产品后再次进行创建bom def bom_create(self, product, bom_type, product_type): bom_id = self.env['mrp.bom'].create({ 'product_tmpl_id': product.product_tmpl_id.id, @@ -779,7 +778,6 @@ class ResMrpBomMo(models.Model): # 坯料BOM组件:选取当前坯料原材料, # 然后根据当前的坯料的体积得出需要的原材料重量(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤) # 坯料所需原材料公式:当前的坯料的体积(立方米m³) *材料密度 * 1000 = 所需原材料重量KG(公斤) - def bom_create_line(self, embryo): # 选取当前坯料原材料 raw_bom_line = self.get_raw_bom(embryo) @@ -826,8 +824,7 @@ class ResMrpBomMo(models.Model): else: return - # 查bom的原材料 - + # 查bom的原材料 def get_raw_bom(self, product): raw_bom = self.env['product.product'].search( [('categ_id.type', '=', '原材料'), ('materials_type_id', '=', product.materials_type_id.id)])