Accept Merge Request #1510: (feature/sale_order_route_pick -> develop)
Merge Request: 增加是否线下加工日志 Created By: @胡尧 Accepted By: @胡尧 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1510?initial=true
This commit is contained in:
@@ -1301,17 +1301,17 @@ class MrpProduction(models.Model):
|
||||
return production_values_str
|
||||
|
||||
# 增加制造订单类型
|
||||
production_type = fields.Selection(
|
||||
[('自动化产线加工', '自动化产线加工'), ('人工线下加工', '人工线下加工')],
|
||||
string='制造类型',
|
||||
compute='_compute_production_type',
|
||||
store=True
|
||||
)
|
||||
# production_type = fields.Selection(
|
||||
# [('自动化产线加工', '自动化产线加工'), ('人工线下加工', '人工线下加工')],
|
||||
# string='制造类型',
|
||||
# compute='_compute_production_type',
|
||||
# store=True
|
||||
# )
|
||||
|
||||
@api.depends('product_id.is_manual_processing')
|
||||
def _compute_production_type(self):
|
||||
for production in self:
|
||||
production.production_type = '自动化产线加工' if not production.product_id.is_manual_processing else '人工线下加工'
|
||||
# @api.depends('product_id.is_manual_processing')
|
||||
# def _compute_production_type(self):
|
||||
# for production in self:
|
||||
# production.production_type = '自动化产线加工' if not production.product_id.is_manual_processing else '人工线下加工'
|
||||
|
||||
|
||||
class sf_detection_result(models.Model):
|
||||
|
||||
@@ -934,6 +934,7 @@ class ResProductMo(models.Model):
|
||||
# if surface_technology:
|
||||
# no_bom_copy_product_id.route_ids |= surface_technology
|
||||
no_bom_copy_product_id.product_tmpl_id.active = True
|
||||
logging.info('no_bom_copy_product_id[is_manual_processing]:%s' % no_bom_copy_product_id.is_manual_processing)
|
||||
materials_id = self.env['sf.production.materials'].search(
|
||||
[('materials_no', '=', item['texture_code'])])
|
||||
materials_type_id = self.env['sf.materials.model'].search(
|
||||
@@ -959,7 +960,7 @@ class ResProductMo(models.Model):
|
||||
'materials_type_id': materials_type_id.id,
|
||||
'single_manufacturing': product_id.single_manufacturing,
|
||||
'is_bfm': True,
|
||||
'active': True
|
||||
'active': True,
|
||||
}
|
||||
# 外协和采购生成的坯料需要根据材料型号绑定供应商
|
||||
if route_type == 'subcontract' or route_type == 'purchase':
|
||||
|
||||
Reference in New Issue
Block a user