将数据初始化由产品辩题改为为模板
This commit is contained in:
@@ -277,8 +277,7 @@ class MrpProduction(models.Model):
|
||||
precision_rounding=move.product_uom.rounding or move.product_id.uom_id.rounding)
|
||||
for move in production.move_raw_ids if move.product_id):
|
||||
production.state = 'progress'
|
||||
elif not production.technology_design_ids:
|
||||
production.state = 'technology_to_confirmed'
|
||||
|
||||
# 新添加的状态逻辑
|
||||
if (
|
||||
production.state == 'to_close' or production.state == 'progress') and production.schedule_state == '未排':
|
||||
@@ -1301,17 +1300,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):
|
||||
|
||||
Reference in New Issue
Block a user