解决代码冲突

This commit is contained in:
jinling.yang
2022-12-12 16:59:42 +08:00
parent 0b0f5c82ed
commit dd5c387585

View File

@@ -172,10 +172,6 @@ class ResMrpBom(models.Model):
# 二、胚料的材料型号与生成产品的材料型号一致;
# 三、胚料的长宽高均要大于模型的长宽高;
# 四、如果匹配成功多个胚料,则选取体积最小的胚料;
def bom_create_Line(self, product):
logging.info('bom_create_Line:%s' % product)
embryo = self.env['product.product'].search(
[('categ_id.is_embryo', '=', True), ('materials_type_id', '=', product.materials_type_id.id),
# 创建新的胚料,根据胚料材料型号的获取方式(
# 自加工,外协,采购) 的配置, 选择不同的库存路线,一种材料型号配置一个路线相关的配置:
# 材料型号配置不同的获取方式: (自加工, 外协, 采购);
@@ -200,8 +196,6 @@ class ResMrpBom(models.Model):
limit=1,
order='volume desc'
)
logging.info('bom_create_Line1:%s' % product)
return self.env['mrp.bom.line'].create(vals)
if embryo:
rate_of_waste = ((embryo.volume - product.model_volume) % embryo.volume) * 100
if rate_of_waste <= 20: