[IMP,MOD] mrp_modules : Usability Improvements in MRP modules

bzr revid: vir@tinyerp.com-20100512140551-bx331bz90n0bh5qp
This commit is contained in:
Vir (Open ERP) 2010-05-12 19:35:51 +05:30
parent 1a7b8c64db
commit e8d8813c4f
8 changed files with 321 additions and 249 deletions

View File

@ -177,7 +177,7 @@ class mrp_bom(osv.osv):
_columns = {
'name': fields.char('Name', size=64, required=True),
'code': fields.char('Code', size=16),
'code': fields.char('Reference', size=16),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the bills of material without removing it."),
'type': fields.selection([('normal','Normal BoM'),('phantom','Sets / Phantom')], 'BoM Type', required=True,
help= "If a sub-product is used in several products, it can be useful to create its own BoM."\

View File

@ -7,7 +7,7 @@
<menuitem id="menu_mrp_reordering" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="4"/>
<menuitem id="menu_mrp_manufacturing" name="Manufacturing" parent="base.menu_mrp_root" sequence="1"/>
<menuitem name="Control" id="menu_mrp_control" parent="base.menu_mrp_root" sequence="3" />
<!-- <menuitem name="Control" id="menu_mrp_control" parent="base.menu_mrp_root" sequence="3" />-->
<menuitem name="Master Data"
id="menu_mrp_bom"
parent="base.menu_mrp_root"
@ -24,8 +24,10 @@
<field name="arch" type="xml">
<form string="Properties categories">
<separator colspan="4" string="General Information"/>
<field colspan="4" name="name" select="1"/>
<field colspan="4" name="description"/>
<separator colspan="4" string="Property Group"/>
<field colspan="4" name="name" select="1" nolabel="1"/>
<separator colspan="4" string="Description"/>
<field colspan="4" name="description" nolabel="1"/>
</form>
</field>
</record>
@ -122,7 +124,7 @@
<notebook colspan="4">
<page string="Work Center">
<field name="resource_type"/>
<field name="calendar_id"/>
<field name="calendar_id" widget="selection"/>
<separator colspan="4" string="Description"/>
<field colspan="4" name="note" nolabel="1"/>
<separator colspan="4" string="Capacity Information"/>
@ -245,21 +247,21 @@
<group colspan="4" col="6">
<field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
<field name="name" select="1"/>
<field name="code" select="1" groups="base.group_extended"/>
<field name="code" select="1" string="Reference" groups="base.group_extended"/>
<newline/>
<field name="product_uom"/>
<field name="product_uom" widget="selection"/>
<field name="product_qty"/>
<field name="routing_id" groups="base.group_extended"/>
<field name="routing_id" widget="selection" groups="base.group_extended"/>
<newline/>
<field name="product_uos" groups="product.group_uos"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos,base.group_extended" widget="selection"/>
<field name="product_uos_qty" groups="product.group_uos,base.group_extended" />
<newline/>
<field name="multi_level_bom" />
<field name="type" groups="base.group_extended"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4" >
<page string="General Information" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}">
<page string="Components" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}">
<field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list" />
</page>
<page string="Revisions" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}">
@ -274,7 +276,7 @@
<field name="date_start"/>
<field name="date_stop"/>
<field name="product_rounding"/>
<field name="product_efficiency"/>
<field name="product_efficiency" groups="base.group_extended"/>
<field colspan="4" name="property_ids" nolabel="2" groups="base.group_extended"/>
</page>
</notebook>
@ -282,6 +284,27 @@
</field>
</record>
<record id="view_mrp_bom_filter" model="ir.ui.view">
<field name="name">mrp.bom.select</field>
<field name="model">mrp.bom</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Bill Of Material">
<group col='4' colspan='4'>
<field name="name"/>
<field name="code" string="Reference"/>
<field name="product_id"/>
<field name="company_id"/>
</group>
<newline/>
<group expand="1" string="Group By" colspan="4" col="8">
<filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Routing" icon="terp-mrp" domain="[]" context="{'group_by':'routing_id'}"/>
</group>
</search>
</field>
</record>
<record id="mrp_bom_tree_view" model="ir.ui.view">
<field name="name">mrp.bom.tree</field>
<field name="model">mrp.bom</field>
@ -308,7 +331,7 @@
<field name="res_model">mrp.bom</field>
<field name="view_type">form</field>
<field name="domain">[('bom_id','=',False)]</field>
<field name="view_id" ref="mrp_bom_tree_view"/>
<field name="search_view_id" ref="view_mrp_bom_filter"/>
</record>
<record id="mrp_bom_form_action2" model="ir.actions.act_window">
<field name="name">Bill of Material Components</field>
@ -386,8 +409,8 @@
<menuitem action="mrp_procurement.mrp_procurement_action" id="menu_mrp_procurement_action"
parent="mrp.menu_mrp_manufacturing" sequence="2" />
<menuitem action="mrp_procurement.mrp_procurement_action5" id="menu_mrp_procurement_exception_action"
parent="mrp.menu_mrp_control" sequence="1" />
<!-- <menuitem action="mrp_procurement.mrp_procurement_action5" id="menu_mrp_procurement_exception_action"-->
<!-- parent="mrp.menu_mrp_control" sequence="1" />-->
<menuitem id="menu_mrp_scheduler" name="Schedulers" parent="base.menu_mrp_root" sequence="4"/>
<menuitem action="mrp_procurement.action_compute_schedulers" id="mrp_Sched_all" parent="mrp.menu_mrp_scheduler" sequence="90"/>
@ -406,7 +429,7 @@
<field name="model">mrp.production</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:date_planned&lt;current_date and state not in ('done','cancel');black:date_planned&gt;=current_date and state in ('done','cancel') " string="Manufacturing Orders">
<tree colors="blue:state in ('confirmed');red:date_planned&lt;current_date and state not in ('done','cancel');black:date_planned&gt;=current_date;gray:state in ('done','cancel') " string="Manufacturing Orders">
<field name="name"/>
<field name="product_id"/>
<field name="product_qty" sum="Total Qty"/>
@ -477,15 +500,15 @@
<field name="product_id" on_change="product_id_change(product_id)" select="1"/>
<field name="product_qty"/>
<group colspan="2" col="3">
<field name="product_uom"/>
<field name="product_uom" widget="selection"/>
<button type="action"
name="%(mrp.action_change_production_qty)d"
string="Change Qty" states="ready,confirmed" />
</group>
<label string="" colspan="2"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<group colspan="2" col="3" groups="product.group_uos">
<field name="product_uos"/>
<field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
<group colspan="2" col="3" groups="product.group_uos,base.group_extended">
<field name="product_uos" widget="selection"/>
<label string=""/>
</group>
</group>
@ -493,9 +516,9 @@
<notebook colspan="4">
<page string="Consumed Products">
<field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)" />
<field name="routing_id" groups="base.group_extended" select="1"/>
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
<field name="routing_id" groups="base.group_extended" select="1" widget="selection"/>
<field name="location_src_id" domain="[('usage','=','internal')]" widget="selection" on_change="location_id_change(location_src_id,location_dest_id)"/>
<field name="location_dest_id" domain="[('usage','=','internal')]" widget="selection"/>
<separator string="" colspan="4"/>
<field colspan="2" name="move_lines" nolabel="1" widget="one2many_list"
@ -636,7 +659,7 @@
<filter icon="terp-mrp" string="Draft"
domain="[('state','=','draft')]"
help="Non confirmed manufacturing orders"/>
<filter icon="terp-mrp" string="Current"
<filter icon="terp-mrp" string="Current" name="Current"
default="1"
domain="[('state','in',('confirmed','ready'))]"
help="Manufacturing Orders which are waiting for raw materials"/>
@ -676,6 +699,7 @@
<field name="view_mode">tree,form,calendar,graph,gantt</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_mrp_production_filter"/>
<field name="context">{'search_default_Current':1}</field>
</record>
<menuitem action="mrp_production_action" id="menu_mrp_production_action" parent="menu_mrp_manufacturing" sequence="1"/>
@ -778,8 +802,8 @@
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
<field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
<field name="product_uos" groups="product.group_uos,base.group_extended"/>
</tree>
</field>
</record>
@ -822,7 +846,7 @@
groups="base.group_extended"
sequence="2"/>
<menuitem action="resource.action_resource_resource_tree" id="menu_view_resource_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar_search_mrp" parent="menu_mrp_configuration" sequence="1"/>
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
</data>

View File

@ -57,7 +57,7 @@
<field name="date_planned"/>
</group>
<newline/>
<group expand="1" string="Extended options..." colspan="10" col="12">
<group expand="1" string="Extended options..." colspan="10" col="12" groups="base.group_extended">
<filter icon="terp-mrp" string="Draft" domain="[('state','=','draft')]"/>
<filter icon="terp-mrp" string="Picking Exception" domain="[('state','=','picking_except')]"/>
<separator orientation="vertical"/>

View File

@ -71,12 +71,12 @@
<separator string="Status" colspan="4"/>
<group colspan="8" col="8">
<field name="state"/>
<button name="button_draft" string="Set Draft" states="cancel"/>
<button name="button_start_working" string="Start" states="draft"/>
<button name="button_resume" string="Resume" states="pause"/>
<button name="button_cancel" string="Cancel" states="draft,startworking"/>
<button name="button_pause" string="Pause" states="startworking"/>
<button name="button_done" string="Finished" states="startworking"/>
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
<button name="button_start_working" string="Start" states="draft" icon="gtk-execute"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel"/>
<button name="button_pause" string="Pause" states="startworking" icon="gtk-execute"/>
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok"/>
</group>
</page>
</notebook>
@ -84,6 +84,27 @@
</field>
</record>
<record id="view_mrp_production_workcenter_form_view_filter" model="ir.ui.view">
<field name="name">mrp.production.workcenter.line.select</field>
<field name="model">mrp.production.workcenter.line</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Work Orders">
<group col='6' colspan='4'>
<field name="name"/>
<field name="workcenter_id"/>
<field name="production_id"/>
</group>
<newline/>
<group expand="1" string="Group By" colspan="10" col="8">
<filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product'}"/>
<filter string="State" icon="terp-mrp" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/>
</group>
</search>
</field>
</record>
<record id="workcenter_line_calendar" model="ir.ui.view">
<field name="name">mrp.production.workcenter.line.calendar</field>
<field name="model">mrp.production.workcenter.line</field>
@ -121,6 +142,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,gantt,calendar,graph</field>
<field name="domain">[('id','=',active_id)]</field>
<field name="search_view_id" ref="view_mrp_production_workcenter_form_view_filter"/>
</record>
<!-- Action for All Operations -->

View File

@ -10,7 +10,7 @@
<field name="model">mrp.procurement</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Procurement Lines" colors="red:state=='draft';black:state=='running';green:state=='confirmed';gray:state in ['done','cancel']">
<tree string="Procurement Lines" colors="red:date_planned&lt;current_date and state in ('exception');black:state=='running';green:state=='confirmed';gray:state in ['done','cancel'];blue:state in ('ready')">
<field name="date_planned" widget="date"/>
<field name="origin"/>
<field name="product_id"/>
@ -45,10 +45,10 @@
<field name="product_id" select="1" on_change="onchange_product_id(product_id)"/>
<field name="location_id" domain="[('usage','=','internal')]"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" widget="selection"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
<field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
<field name="product_uos" widget="selection" groups="product.group_uos,base.group_extended"/>
<separator colspan="4" string="Status"/>
<field colspan="4" name="message" readonly="1"/>
@ -85,7 +85,7 @@
<field name="arch" type="xml">
<search string="Search Procurement">
<group col='10' colspan='4'>
<filter icon="terp-mrp" string="Current" domain="[('state','in',('draft','confirmed'))]" default="1" help="Procurement Orders in draft or open state."/>
<filter icon="terp-mrp" string="Current" name="Current" domain="[('state','in',('draft','confirmed'))]" default="1" help="Procurement Orders in draft or open state."/>
<filter icon="terp-mrp" string="Exceptions" domain="[('state','=','exception')]" help="Procurement Orders with exceptions"/>
<filter icon="terp-mrp" string="Late"
domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed'))]"
@ -102,6 +102,7 @@
<filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Reason" icon="terp-mrp" domain="[]" context="{'group_by':'name'}"/>
<filter string="Scheduled Date" icon="terp-mrp" domain="[]" context="{'group_by':'date_planned'}"/>
<filter string="State" icon="terp-mrp" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
@ -113,6 +114,7 @@
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_mrp_procurement_filter"/>
<field name="context">{'search_default_Current':1}</field>
</record>
<record id="mrp_procurement_action3" model="ir.actions.act_window">

View File

@ -2,6 +2,26 @@
<openerp>
<data>
<record id="view_repair_order_tree" model="ir.ui.view">
<field name="name">mrp.repair.tree</field>
<field name="model">mrp.repair</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Repairs order">
<field name="name" select="1" />
<field name="product_id" select="1" />
<field name="prodlot_id"/>
<field name="partner_id"/>
<field name="address_id"/>
<field name="location_id"/>
<field name="move_id"/>
<field name="location_dest_id"/>
<field name="guarantee_limit"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_repair_order_form" model="ir.ui.view">
<field name="name">mrp.repair.form</field>
<field name="model">mrp.repair</field>
@ -79,17 +99,17 @@
<newline/>
<group col="13" colspan="4">
<field name="state"/>
<button name="repair_confirm" states="draft" string="Confirm Repair"/>
<button name="repair_ready" states="confirmed" string="Start Repair"/>
<button name="action_repair_start" states="ready" string="Start Repair"/>
<button name="action_repair_end" states="under_repair" string="End Repair"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice"/>
<button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name="cancel" states="draft" string="Cancel Repair"/>
<button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action"/>
<button name="repair_confirm" states="draft" string="Confirm Repair" icon="gtk-apply"/>
<button name="repair_ready" states="confirmed" string="Start Repair" icon="gtk-execute"/>
<button name="action_repair_start" states="ready" string="Start Repair" icon="gtk-execute"/>
<button name="action_repair_end" states="under_repair" string="End Repair" icon="gtk-ok"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-convert"/>
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="gtk-apply"/>
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice" icon="gtk-ok"/>
<button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="cancel" states="draft" string="Cancel Repair" icon="gtk-cancel"/>
<button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action" icon="gtk-cancel"/>
</group>
</page>
<page string="Invoicing">
@ -150,23 +170,25 @@
</field>
</record>
<record id="view_repair_order_tree" model="ir.ui.view">
<field name="name">mrp.repair.tree</field>
<record id="view_repair_order_form_filter" model="ir.ui.view">
<field name="name">mrp.repair.select</field>
<field name="model">mrp.repair</field>
<field name="type">tree</field>
<field name="type">search</field>
<field name="arch" type="xml">
<tree string="Repairs order">
<field name="name" select="1" />
<field name="product_id" select="1" />
<field name="prodlot_id"/>
<field name="partner_id"/>
<field name="address_id"/>
<field name="location_id"/>
<field name="state"/>
<field name="move_id"/>
<field name="location_dest_id"/>
<field name="guarantee_limit"/>
</tree>
<search string="Search Reair Orders">
<group col='4' colspan='4'>
<field name="name" />
<field name="product_id" />
</group>
<newline/>
<group expand="1" string="Group By" colspan="10" col="8">
<filter string="Product" icon="terp-mrp" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="State" icon="terp-mrp" domain="[]" context="{'group_by':'state'}"/>
<filter string="Partner" icon="terp-mrp" domain="[]" context="{'group_by':'partner_id'}"/>
</group>
</search>
</field>
</record>
@ -184,6 +206,7 @@
<field name="res_model">mrp.repair</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_repair_order_form_filter"/>
</record>
<record id="action_repair_quotation_tree" model="ir.actions.act_window">

View File

@ -59,6 +59,7 @@
<newline/>
<group expand="1" string="Group By..." colspan="4" col="20">
<filter string="Resouce" icon="terp-project" domain="[]" context="{'group_by':'resource_id'}"/>
<filter string="Company" icon="terp-project" domain="[]" context="{'group_by':'company_id'}"/>
</group>
</search>
</field>
@ -165,10 +166,10 @@
<field name="name" />
<field name="active"/>
<field name="company_id" widget="selection"/>
<field name="calendar_id" />
<field name="calendar_id" widget="selection"/>
<field name="resource_type" />
<field name="user_id" attrs="{'required':[('resource_type','=','user')]}"/>
<field name="time_efficiency" />
<field name="time_efficiency" groups="base.group_extended"/>
</form>
</field>
</record>
@ -182,7 +183,7 @@
<field name="company_id" />
<field name="resource_type" />
<field name="calendar_id" />
<field name="time_efficiency" />
<field name="time_efficiency" groups="base.group_extended"/>
<field name="user_id" />
</tree>
</field>
@ -205,7 +206,7 @@
<field name="calendar_id" />
<field name="date_from" />
<field name="date_to" />
<field name="resource_id" on_change="onchange_resource(resource_id)"/>
<field name="resource_id" widget="selection" on_change="onchange_resource(resource_id)"/>
</form>
</field>
</record>