Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化模型上色路径
This commit is contained in:
@@ -37,7 +37,7 @@ class ResMrpBomMo(models.Model):
|
||||
'product_qty': 1,
|
||||
'product_uom_id': 1
|
||||
}
|
||||
return self.env['mrp.bom.line'].create(vals)
|
||||
return self.env['mrp.bom.line'].sudo().create(vals)
|
||||
|
||||
# 业务平台分配工厂后在智能工厂先创建销售订单再创建该产品后再次进行创建bom
|
||||
def bom_create(self, product, bom_type, product_type):
|
||||
@@ -64,7 +64,7 @@ class ResMrpBomMo(models.Model):
|
||||
qty = 1
|
||||
if round(embryo.volume * raw_bom_line.materials_type_id.density / 1000000) > 1:
|
||||
qty = round(embryo.volume * raw_bom_line.materials_type_id.density / 1000000)
|
||||
bom_line = self.env['mrp.bom.line'].create({
|
||||
bom_line = self.env['mrp.bom.line'].sudo().create({
|
||||
'bom_id': self.id,
|
||||
'product_id': raw_bom_line.id,
|
||||
'product_tmpl_id': raw_bom_line.product_tmpl_id.id,
|
||||
|
||||
Reference in New Issue
Block a user