Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-first_10_clicks-mrp-mma into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-first_10_clicks-mrp-mma/+merge/110009
Hello Sir,
In Order to improve user experience, I have improved the following things:
1. Improved the menu-tips.
2. Added a tree view on one2many field
3. Highlighted buttons.
4. Restricted some fields to appropriate groups.
Thanks.
Mayur
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-first_10_clicks-mrp-mma/+merge/110009
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-first_10_clicks-mrp-mma.
=== modified file 'mrp/mrp.py'
--- mrp/mrp.py 2012-05-22 16:10:55 +0000
+++ mrp/mrp.py 2012-06-13 09:26:22 +0000
@@ -454,7 +454,7 @@
'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', select=True),
'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft':[('readonly',False)]}),
- 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
+ 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uos_qty': fields.float('Product UoS Qty', states={'draft':[('readonly',False)]}, readonly=True),
'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True),
=== modified file 'mrp/mrp_view.xml'
--- mrp/mrp_view.xml 2012-06-09 23:32:39 +0000
+++ mrp/mrp_view.xml 2012-06-13 09:26:22 +0000
@@ -325,7 +325,7 @@
<h1>
<field name="product_id" on_change="onchange_product_id(product_id, name, context)" class="oe_form_inline"/>:
<field name="product_qty" class="oe_form_inline"/>
- <field name="product_uom" class="oe_form_inline"/>
+ <field name="product_uom" class="oe_form_inline" groups="product.group_uom"/>
</h1>
<label for="routing_id" class="oe_form_readonly_hidden"/>
<h2>
@@ -349,7 +349,7 @@
<tree string="Components" editable="bottom">
<field name="product_id" on_change="onchange_product_id(product_id, name)"/>
<field name="product_qty"/>
- <field name="product_uom"/>
+ <field name="product_uom" groups="product.group_uom"/>
<field name="name" invisible="1"/>
<field name="date_start"/>
<field name="date_stop"/>
@@ -418,7 +418,7 @@
<field name="code"/>
<field name="product_id"/>
<field name="product_qty"/>
- <field name="product_uom"/>
+ <field name="product_uom" groups="product.group_uom"/>
<field name="type"/>
<field name="method"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
@@ -440,7 +440,7 @@
<field name="product_id" string="Component Product"/>
<field name="bom_id"/>
<field name="product_qty"/>
- <field name="product_uom"/>
+ <field name="product_uom" groups="product.group_uom"/>
<field name="type"/>
<field name="method"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
@@ -542,7 +542,7 @@
<field name="date_planned"/>
<field name="product_id"/>
<field name="product_qty" sum="Total Qty"/>
- <field name="product_uom"/>
+ <field name="product_uom" groups="product.group_uom"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
<field name="hour_total" sum="Total Hours"/>
<field name="cycle_total" sum="Total Cycles"/>
@@ -598,9 +598,9 @@
<field name="arch" type="xml">
<form string="Manufacturing Orders" version="7.0">
<header>
- <button name="button_confirm" states="draft" string="Confirm Production"/>
- <button name="button_produce" states="ready" string="Start Production"/>
- <button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" type="action"/>
+ <button name="button_confirm" states="draft" string="Confirm Production" class="oe_form_button_hi"/>
+ <button name="button_produce" states="ready" string="Start Production" class="oe_form_button_hi"/>
+ <button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" type="action" class="oe_form_button_hi"/>
<button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object"/>
<button name="button_recreate" states="picking_except" string="Recreate Picking"/>
<button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel"/>
@@ -612,11 +612,11 @@
<h1>
<field name="product_id" on_change="product_id_change(product_id)" domain="[('supply_method','=','produce')]" class="oe_form_inline"/>
<field name="product_qty" class="oe_form_inline"/>
- <field name="product_uom" class="oe_form_inline"/>
+ <field name="product_uom" class="oe_form_inline" groups="product.group_uom"/>
<button type="action"
icon="terp-accessories-archiver+" class="oe_form_inline"
name="%(mrp.action_change_production_qty)d"
- string="Change Qty" states="ready,confirmed" />
+ string="Change Quantity" states="ready,confirmed" />
</h1>
<label for="routing_id" groups="mrp.group_mrp_routings" class="oe_form_readonly_hidden"/>
<h2>
@@ -638,18 +638,18 @@
<page string="Consumed Products">
<group col="4">
<group>
- <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="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)" groups="stock.group_locations"/>
+ <field name="location_dest_id" domain="[('usage','=','internal')]" groups="stock.group_locations"/>
</group>
<group>
<field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)"/>
</group>
<field name="move_lines" domain="[('state','<>', ('done', 'cancel'))]">
<tree colors="blue:state == 'draft';black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') " string="Products to Consume">
- <field name="product_id" />
- <field name="product_qty" string="Qty"/>
- <field name="product_uom" string="Unit of Measure"/>
- <field name="location_id" string="Source Loc."/>
+ <field name="product_id"/>
+ <field name="product_qty"/>
+ <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
+ <field name="location_id" string="Source Loc." groups="stock.group_locations"/>
<field name="state" invisible="1"/>
<button name="%(stock.move_consume)d"
string="Consume Products" type="action"
@@ -669,8 +669,8 @@
<field name="move_lines2" domain="[('state','in', ('done', 'cancel'))]">
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state == 'cancel' " string="Consumed Products" editable="bottom">
<field name="product_id" readonly="1"/>
- <field name="product_qty" readonly="1" string="Qty"/>
- <field name="product_uom" readonly="1" string="Unit of Measure"/>
+ <field name="product_qty" readonly="1"/>
+ <field name="product_uom" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
<field name="prodlot_id" context="{'product_id': product_id}"/>
<field name="state" invisible="1"/>
<field name="scrapped" invisible="1"/>
@@ -689,7 +689,7 @@
<tree string="Products to Finish">
<field name="product_id" />
<field name="product_qty" string="Qty"/>
- <field name="product_uom" string="Unit of Measure"/>
+ <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
<field name="state" invisible="1"/>
<button name="%(stock.action_partial_move_server)d"
string="Partial"
@@ -705,7 +705,7 @@
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
- <field name="product_uom" readonly="1" string="Unit of Measure"/>
+ <field name="product_uom" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
<field name="location_dest_id" readonly="1" string="Destination Loc." widget="selection"/>
<field name="prodlot_id" context="{'product_id': product_id}"/>
<field name="scrapped" invisible="1"/>
@@ -755,7 +755,7 @@
<field name="date_start"/>
<field name="date_finished"/>
<field name="picking_id"/>
- <field name="move_prod_id"/>
+ <field name="move_prod_id" groups="stock.group_locations"/>
</group>
</page>
</notebook>
@@ -815,7 +815,9 @@
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_mrp_production_filter"/>
<field name="context">{}</field>
- <field name="help">Manufacturing Orders are usually proposed automatically by OpenERP based on the bill of materials and the procurement rules, but you can also create manufacturing orders manually. OpenERP will handle the consumption of the raw materials (stock decrease) and the production of the finished products (stock increase) when the order is processed.</field>
+ <field name="help">Click here to create a new Manufacturing Order
+ <p>
+ To process the production, don't forget to create a Bill of Material. Manufacturing Order can be automatically generated based on procurement rules specified on the product</field>
</record>
<menuitem action="mrp_production_action" id="menu_mrp_production_action"
parent="menu_mrp_manufacturing" sequence="1"/>
@@ -873,7 +875,7 @@
<field name="name"/>
<field name="product_id"/>
<field name="product_qty"/>
- <field name="product_uom"/>
+ <field name="product_uom" groups="product.group_uom"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
</group>
@@ -888,7 +890,7 @@
<tree string="Scheduled Products">
<field name="product_id"/>
<field name="product_qty"/>
- <field name="product_uom"/>
+ <field name="product_uom" groups="product.group_uom"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
</tree>
@@ -927,7 +929,17 @@
<field name="arch" type="xml">
<group name="misc" position="after">
<separator string="Bill of Materials" colspan="4"/>
- <field name="bom_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}"/>
+ <field name="bom_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}" widget="one2many_list"
+ mode="tree,form">
+ <tree string="Bill of Materials">
+ <field name="name" string="Component Name"/>
+ <field name="bom_id"/>
+ <field name="product_qty" string="Quantity of Product"/>
+ <field name="type"/>
+ <field name="date_start"/>
+ <field name="date_stop"/>
+ </tree>
+ </field>
</group>
</field>
</record>
=== modified file 'procurement/procurement.py'
--- procurement/procurement.py 2012-06-01 14:59:24 +0000
+++ procurement/procurement.py 2012-06-13 09:26:22 +0000
@@ -550,10 +550,10 @@
'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"),
'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','=','product')]),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
- 'product_min_qty': fields.float('Min Quantity', required=True,
+ 'product_min_qty': fields.float('Minimum Quantity', required=True,
help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\
"a procurement to bring the virtual stock to the Max Quantity."),
- 'product_max_qty': fields.float('Max Quantity', required=True,
+ 'product_max_qty': fields.float('Maximum Quantity', required=True,
help="When the virtual stock goes below the Min Quantity, OpenERP generates "\
"a procurement to bring the virtual stock to the Quantity specified as Max Quantity."),
'qty_multiple': fields.integer('Qty Multiple', required=True,
=== modified file 'procurement/procurement_view.xml'
--- procurement/procurement_view.xml 2012-06-09 15:19:20 +0000
+++ procurement/procurement_view.xml 2012-06-13 09:26:22 +0000
@@ -280,7 +280,15 @@
<group name="misc" position="after">
<group colspan="4" attrs="{'invisible':[('type','=','service')]}" groups="stock.group_stock_manager">
<separator string="Minimum Stock Rules" colspan="4"/>
- <field name="orderpoint_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}"/>
+ <field colspan="4" name="orderpoint_ids" nolabel="1" context="{'default_product_id': active_id}" widget="one2many_list"
+ mode="tree,form">
+ <tree string="Reordering Rules">
+ <field name="name"/>
+ <field name="warehouse_id"/>
+ <field name="product_min_qty"/>
+ <field name="product_max_qty"/>
+ </tree>
+ </field>
</group>
</group>
</field>
=== modified file 'product/product_view.xml'
--- product/product_view.xml 2012-06-10 08:35:15 +0000
+++ product/product_view.xml 2012-06-13 09:26:22 +0000
@@ -543,7 +543,7 @@
<field name="product_name"/>
<field name="product_code"/>
<field name="min_qty"/>
- <field name="product_uom"/>
+ <field name="product_uom" groups="product.group_uom"/>
<field name="delay"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
@@ -697,7 +697,7 @@
<field name="seller_ids"/>
</page>
<page string="Descriptions">
- <separator string="Description"/>
+ <separator string="Internal Description"/>
<field name="description"/>
<separator string="Sale Description"/>
<field name="description_sale"/>
=== modified file 'stock/product_view.xml'
--- stock/product_view.xml 2012-06-09 20:31:27 +0000
+++ stock/product_view.xml 2012-06-13 09:26:22 +0000
@@ -132,7 +132,7 @@
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
- <field name="domain">[('product_id','=',active_id),('picking_id.type','=','in')]</field>
+ <field name="domain">[('product_id','=',[active_id]),('picking_id.type','=','in')]</field>
<field name="view_id" ref="view_move_tree_reception_picking"/>
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
<field name="search_view_id" ref="view_move_search_reception_incoming_picking"/>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp