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

View File

@@ -1300,18 +1300,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):