From a75269b3a34db3d2f5cfc471f4ad6090a6ab63b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Thu, 14 Nov 2024 15:14:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=B6=E9=80=A0=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/__manifest__.py | 2 +- sf_manufacturing/models/mrp_production.py | 22 +++++++++---------- .../views/mrp_production_addional_change.xml | 6 ++--- sf_plan/models/custom_plan.py | 12 +++++----- sf_plan/views/view.xml | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sf_manufacturing/__manifest__.py b/sf_manufacturing/__manifest__.py index 3320f943..98c71f21 100644 --- a/sf_manufacturing/__manifest__.py +++ b/sf_manufacturing/__manifest__.py @@ -10,7 +10,7 @@ """, 'category': 'sf', 'website': 'https://www.sf.jikimo.com', - 'depends': ['sf_base', 'sf_maintenance', 'web_widget_model_viewer', 'sf_warehouse','jikimo_attachment_viewer'], + 'depends': ['sf_base', 'sf_maintenance', 'web_widget_model_viewer', 'sf_warehouse','jikimo_attachment_viewer', 'jikimo_sale_multiple_supply_methods'], 'data': [ 'data/stock_data.xml', 'data/empty_racks_data.xml', diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 13be15e3..2c499597 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -1299,18 +1299,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): diff --git a/sf_manufacturing/views/mrp_production_addional_change.xml b/sf_manufacturing/views/mrp_production_addional_change.xml index 2bccedf0..c218c2d5 100644 --- a/sf_manufacturing/views/mrp_production_addional_change.xml +++ b/sf_manufacturing/views/mrp_production_addional_change.xml @@ -36,8 +36,8 @@ decoration-success="reservation_state == 'assigned'"/> - + @@ -91,7 +91,7 @@ - + - +