From 1b87a81a5a0d01291ec55532ba6be13366458c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Mon, 11 Nov 2024 11:06:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E4=BE=9B=E8=B4=A7=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jikimo_sale_multiple_supply_methods/__manifest__.py | 2 +- sf_manufacturing/models/mrp_production.py | 7 +++---- sf_manufacturing/views/mrp_production_addional_change.xml | 7 ++++--- sf_plan/models/custom_plan.py | 8 ++++++++ sf_plan/views/view.xml | 1 + 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/jikimo_sale_multiple_supply_methods/__manifest__.py b/jikimo_sale_multiple_supply_methods/__manifest__.py index 256e8511..7dfebd0e 100644 --- a/jikimo_sale_multiple_supply_methods/__manifest__.py +++ b/jikimo_sale_multiple_supply_methods/__manifest__.py @@ -6,7 +6,7 @@ 'author': 'fox', 'website': '', 'category': '', - 'depends': ['product', 'sf_dlm', 'sale_stock'], + 'depends': ['product', 'sf_dlm', 'sale_stock', 'sf_sale'], "data": [ 'security/ir.model.access.csv', 'data/stock_routes.xml', diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index bfe0f6e2..272bb855 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -1187,16 +1187,15 @@ class MrpProduction(models.Model): 'user_id': production.user_id.id} return production_values_str - # 增加制造订单类型 + # 增加制造订单类型 production_type = fields.Selection( [('自动化产线加工', '自动化产线加工'), ('人工线下加工', '人工线下加工')], - string='制造订单类型', - required=True, + string='制造类型', compute='_compute_production_type', store=True ) - @api.depends('product_id') + @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 '人工线下加工' diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml index 4c06c544..2074bb9e 100644 --- a/sf_manufacturing/views/mrp_production_addional_change.xml +++ b/sf_manufacturing/views/mrp_production_addional_change.xml @@ -35,9 +35,9 @@ - - - + + + @@ -80,6 +80,7 @@ + +