增加制造类型
This commit is contained in:
@@ -1299,18 +1299,18 @@ class MrpProduction(models.Model):
|
||||
'user_id': production.user_id.id}
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user