[IMP] mrp: Improve the settings form view
This commit is contained in:
committed by
Yannick Tivisse
parent
82fc1ac326
commit
a3d23c93b8
@@ -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")
|
||||
|
||||
@@ -7,24 +7,147 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Configure Manufacturing" class= "oe_form_configuration">
|
||||
<header>
|
||||
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
|
||||
<button string="Save" type="object" name="execute" class="oe_highlight"/>
|
||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
||||
</header>
|
||||
<group string="Logistics" name="logistics">
|
||||
<sheet>
|
||||
<h2>Operations</h2>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="manufacturing_lead"/>
|
||||
</group>
|
||||
<group string="Manufacturing Order">
|
||||
<field name="group_product_variant" widget="radio"/>
|
||||
<field name="module_mrp_byproduct" widget="radio"/>
|
||||
<field name="group_mrp_routings" widget="radio"/>
|
||||
</group>
|
||||
<group string="Extra Features">
|
||||
<field name="module_mrp_mps" widget="upgrade_radio"/>
|
||||
<field name="module_mrp_plm" widget="upgrade_radio"/>
|
||||
<field name="module_mrp_maintenance" widget="upgrade_radio"/>
|
||||
<field name="module_quality_mrp" widget="upgrade_radio"/>
|
||||
</group>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-md-6 col-xs-12 o_setting_box" id="work_order" title="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.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_mrp_routings"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_mrp_routings"/>
|
||||
<div class="text-muted">
|
||||
Go through a production routing with work orders
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('group_mrp_routings','=',False)]}">
|
||||
<div class="mt16">
|
||||
<div>
|
||||
<button name="%(mrp.mrp_routing_action)d" icon="fa-arrow-right" type="action" string="Routings" class="btn-link"/>
|
||||
</div>
|
||||
<div>
|
||||
<button name="%(mrp.mrp_workcenter_action)d" icon="fa-arrow-right" type="action" string="Work Centers" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12 o_setting_box" id="mrp_quality">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_quality_mrp" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_quality_mrp"/>
|
||||
<div class="text-muted">
|
||||
Manage quality control points, checks and measures
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12 o_setting_box" id="mrp_repair">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_mrp_repair"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_mrp_repair"/>
|
||||
<div class="text-muted">
|
||||
Repair broken or damaged products
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12 o_setting_box" id="mrp_maintenance">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_mrp_maintenance" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_mrp_maintenance"/>
|
||||
<div class="text-muted">
|
||||
Schedule maintenance activities
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Products</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-md-6 col-xs-12 o_setting_box" id="product_variants">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_product_variant"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_product_variant"/>
|
||||
<div class="text-muted">
|
||||
Set product attributes (e.g. color, size) to manage variants
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('group_product_variant','=',False)]}">
|
||||
<div class="mt16">
|
||||
<button name="%(product.attribute_action)d" icon="fa-arrow-right" type="action" string="Attributes" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12 o_setting_box" id="mrp_byproduct" title="Add by-products to bills of materials. This can be used to get several finished products as well. Without this option you only do: A + B = C. With the option: A + B = C + D.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_mrp_byproduct"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_mrp_byproduct"/>
|
||||
<div class="text-muted">
|
||||
Produce residual products (A + B -> C + D)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12 o_setting_box" id="mrp_plm">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_mrp_plm" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_mrp_plm"/>
|
||||
<div class="text-muted">
|
||||
Track changes on products, BoMs and routings
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Planning</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-md-6 col-xs-12 o_setting_box" id="mrp_mps" title="Using a MPS report to schedule your reordering and manufacturing operations is useful if you have long lead time and if you produce based on sales forecasts.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_mrp_mps" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_mrp_mps"/>
|
||||
<div class="text-muted">
|
||||
Plan procurement orders based on forecasts
|
||||
</div>
|
||||
<div class="content-group" id="content_mrp_mps">
|
||||
<div class="text-warning mt16" id="mrp_mps" attrs="{'invisible': [('module_mrp_mps','=',False)]}">
|
||||
Save this page and come back here to set up the feature.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12 o_setting_box" id="security_lead_time">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="default_use_manufacturing_lead"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Security Lead Time" for="default_use_manufacturing_lead"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Schedule manufacturing orders earlier to avoid delays
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('default_use_manufacturing_lead','=',False)]}">
|
||||
<div class="mt16" >
|
||||
Move forward deadline start dates by
|
||||
<field name="manufacturing_lead" class="oe_inline"/> days
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user