From a3d23c93b8ed01bc7e7f3733895f210dda87be85 Mon Sep 17 00:00:00 2001 From: Pratima Gupta Date: Fri, 6 Jan 2017 10:29:05 +0100 Subject: [PATCH] [IMP] mrp: Improve the settings form view --- addons/mrp/models/mrp_config_settings.py | 46 ++---- .../mrp/views/mrp_config_settings_views.xml | 153 ++++++++++++++++-- 2 files changed, 149 insertions(+), 50 deletions(-) diff --git a/addons/mrp/models/mrp_config_settings.py b/addons/mrp/models/mrp_config_settings.py index 02d609c7ea0..53411d9fd35 100644 --- a/addons/mrp/models/mrp_config_settings.py +++ b/addons/mrp/models/mrp_config_settings.py @@ -10,39 +10,15 @@ class MrpConfigSettings(models.TransientModel): company_id = fields.Many2one('res.company', string='Company', required=True, default=lambda self: self.env.user.company_id) - manufacturing_lead = fields.Float(related='company_id.manufacturing_lead', string="Manufacturing Lead Time *") - group_product_variant = fields.Selection([ - (0, "No variants on products"), - (1, 'Products can have several attributes, defining variants (Example: size, color,...)')], "Product Variants", - help='Work with product variant allows you to define some variant of the same products, an ease the product management in the ecommerce for example', + manufacturing_lead = fields.Float(related='company_id.manufacturing_lead', string="Manufacturing Lead Time") + default_use_manufacturing_lead = fields.Boolean(string="Default Manufacturing Lead Time", default_model='mrp.config.settings') + group_product_variant = fields.Boolean("Attributes & Variants", implied_group='product.group_product_variant') - module_mrp_byproduct = fields.Selection([ - (0, "No by-products in bills of materials (A + B --> C)"), - (1, "Bills of materials may produce residual products (A + B --> C + D)")], "By-Products", - help='You can configure by-products in the bill of material.\n' - 'Without this module: A + B + C -> D.\n' - 'With this module: A + B + C -> D + E.\n' - '-This installs the module mrp_byproduct.') - module_mrp_mps = fields.Selection([ - (0, "No need for Master Production Schedule as products have short lead times"), - (1, "Use Master Production Schedule in order to create procurements based on forecasts"), - ], string="Master Production Schedule") - module_mrp_plm = fields.Selection([ - (0, "No product lifecycle management"), - (1, "Manage engineering changes, versions and documents") - ], string="PLM") - module_mrp_maintenance = fields.Selection([ - (0, "No maintenance machine and work centers"), - (1, "Preventive and Corrective maintenance management") - ], string="Maintenance") - module_quality_mrp = fields.Selection([ - (0, "No quality control"), - (1, "Manage quality control points, checks and measures") - ], string="Quality") - group_mrp_routings = fields.Selection([ - (0, "Manage production by manufacturing orders"), - (1, "Manage production by work orders")], "Routings & Planning", - implied_group='mrp.group_mrp_routings', - help='Work Order Operations allow you to create and manage the manufacturing operations that should be followed ' - 'within your work centers in order to produce a product. They are attached to bills of materials ' - 'that will define the required raw materials.') + module_mrp_byproduct = fields.Boolean("By-Products") + module_mrp_mps = fields.Boolean("Master Production Schedule") + module_mrp_plm = fields.Boolean("Product Lifecycle Management") + module_mrp_maintenance = fields.Boolean("Maintenance") + module_quality_mrp = fields.Boolean("Quality Control") + group_mrp_routings = fields.Boolean("Work Orders", + implied_group='mrp.group_mrp_routings') + module_mrp_repair = fields.Boolean("Repair") diff --git a/addons/mrp/views/mrp_config_settings_views.xml b/addons/mrp/views/mrp_config_settings_views.xml index c5d960500e0..c645f1362b4 100644 --- a/addons/mrp/views/mrp_config_settings_views.xml +++ b/addons/mrp/views/mrp_config_settings_views.xml @@ -7,24 +7,147 @@
-
- + +

Operations

- -
- - - - - - - - - - - +
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+

Products

+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+

Planning

+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+