将成品的追溯复制到product上,将坯料的追溯同成品的追组
This commit is contained in:
@@ -1030,6 +1030,7 @@ class ResProductMo(models.Model):
|
|||||||
'single_manufacturing': product_id.single_manufacturing,
|
'single_manufacturing': product_id.single_manufacturing,
|
||||||
'is_bfm': True,
|
'is_bfm': True,
|
||||||
'active': True,
|
'active': True,
|
||||||
|
'tracking': finish_product.tracking, # 坯料的跟踪方式跟随成品
|
||||||
}
|
}
|
||||||
# 外协和采购生成的坯料需要根据材料型号绑定供应商
|
# 外协和采购生成的坯料需要根据材料型号绑定供应商
|
||||||
if route_type == 'subcontract' or route_type == 'purchase':
|
if route_type == 'subcontract' or route_type == 'purchase':
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ class SaleOrder(models.Model):
|
|||||||
line.product_id.product_tmpl_id.copy_template(product_template_id)
|
line.product_id.product_tmpl_id.copy_template(product_template_id)
|
||||||
# 将模板上的single_manufacturing属性复制到成品上
|
# 将模板上的single_manufacturing属性复制到成品上
|
||||||
line.product_id.single_manufacturing = product_template_id.single_manufacturing
|
line.product_id.single_manufacturing = product_template_id.single_manufacturing
|
||||||
|
line.product_id.tracking = product_template_id.tracking
|
||||||
|
|
||||||
order_id = self
|
order_id = self
|
||||||
product = line.product_id
|
product = line.product_id
|
||||||
|
|||||||
Reference in New Issue
Block a user