Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造功能优化
This commit is contained in:
@@ -754,7 +754,7 @@ class ReStockMove(models.Model):
|
|||||||
if move.product_id.categ_id.type == '成品':
|
if move.product_id.categ_id.type == '成品':
|
||||||
move.part_number = move.product_id.part_number
|
move.part_number = move.product_id.part_number
|
||||||
move.part_name = move.product_id.part_name
|
move.part_name = move.product_id.part_name
|
||||||
elif move.product_id.categ_id.type == '坯料':
|
elif move.product_id.categ_id.type == '坯料' or move.product_id.categ_id.type == '原材料':
|
||||||
product_name = ''
|
product_name = ''
|
||||||
match = re.search(r'(S\d{5}-\d)', move.product_id.name)
|
match = re.search(r'(S\d{5}-\d)', move.product_id.name)
|
||||||
# 如果匹配成功,提取结果
|
# 如果匹配成功,提取结果
|
||||||
|
|||||||
@@ -251,6 +251,9 @@ class sfMaterialModel(models.Model):
|
|||||||
materials_model.density = item['density']
|
materials_model.density = item['density']
|
||||||
materials_model.active = item['active']
|
materials_model.active = item['active']
|
||||||
materials_model.materials_code= item['materials_code']
|
materials_model.materials_code= item['materials_code']
|
||||||
|
materials_model.alloy_code = item['alloy_code']
|
||||||
|
materials_model.apply = self.env['material.apply'].search(
|
||||||
|
[("name", 'in', item['apply'])]).ids
|
||||||
else:
|
else:
|
||||||
raise ValidationError("材料型号认证未通过")
|
raise ValidationError("材料型号认证未通过")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user