This commit is contained in:
胡尧
2024-11-11 10:22:53 +08:00
parent 2798ce6183
commit 0f37b45b30
26 changed files with 70 additions and 357 deletions

View File

@@ -1186,6 +1186,20 @@ class MrpProduction(models.Model):
'move_dest_ids': production.move_dest_ids.ids,
'user_id': production.user_id.id}
return production_values_str
# 增加制造订单类型
production_type = fields.Selection(
[('自动化产线加工', '自动化产线加工'), ('人工线下加工', '人工线下加工')],
string='制造订单类型',
required=True,
compute='_compute_production_type',
store=True
)
@api.depends('product_id')
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):

View File

@@ -955,6 +955,7 @@ class ResProductMo(models.Model):
'list_price': item['price'],
'materials_id': materials_id.id,
'materials_type_id': materials_type_id.id,
'single_manufacturing': product_id.single_manufacturing,
'is_bfm': True,
'active': True
}