Accept Merge Request #1507: (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/1507?initial=true
This commit is contained in:
胡尧
2024-11-14 15:04:50 +08:00
committed by Coding
12 changed files with 379 additions and 369 deletions

View File

@@ -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 == '未排':
@@ -1302,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):