Purnendu Singh (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-stock_picking_usability into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-stock_picking_usability/+merge/98408

Hello,

Improve the string of state, buttons and report label according to Delivery, 
reception and Internal moves.

Improve the view of Delivery, Reception And Internal Moves for better usability 
and simplicity.

Thanks,
Purnendu Singh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-stock_picking_usability/+merge/98408
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-stock_picking_usability.
=== modified file 'purchase/stock_view.xml'
--- purchase/stock_view.xml	2011-12-19 16:54:40 +0000
+++ purchase/stock_view.xml	2012-03-20 13:34:23 +0000
@@ -19,7 +19,7 @@
             <field name="inherit_id" ref="stock.view_picking_form"/>
             <field name="arch" type="xml">
                 <field name="auto_picking" position="after">
-                    <field name="purchase_id"/>
+                    <field name="purchase_id" invisible="1"/>
                 </field>
             </field>
         </record>
@@ -31,7 +31,7 @@
             res_model="stock.picking"
             groups="base.group_extended"
             src_model="purchase.order"
-            context="{'default_purchase_id': active_id, 'contact_display': 'partner'}" />
+            context="{'default_purchase_id': active_id, 'contact_display': 'partner', 'default_type': 'in'}" />
        
         <record id="action_picking_in_tree_view" model="ir.actions.act_window.view">
             <field eval="1" name="sequence"/>
@@ -52,9 +52,9 @@
             <field name="type">form</field>
             <field name="inherit_id" ref="stock.view_picking_in_form"/>
             <field name="arch" type="xml">
-                <field name="backorder_id" position="after">
+                 <xpath expr="/form/notebook/page/field[@name='date']"  position="before">
                     <field name="purchase_id"/>
-                </field>
+                </xpath>
             </field>
         </record>
         
@@ -115,6 +115,19 @@
             <field name="help">If you set the Invoicing Control on a purchase order as "Based on receptions", you can track here all the product receptions and create invoices for those receptions.</field>
        </record>
 
+        <record id="action_picking_in_tree_view1" model="ir.actions.act_window.view">
+            <field eval="1" name="sequence"/>
+            <field name="view_mode">tree</field>
+            <field name="view_id" ref="stock.view_picking_in_tree"/>
+            <field name="act_window_id" ref="action_picking_tree4_picking_to_invoice"/>
+        </record>
+        <record id="action_picking_in_form_view1" model="ir.actions.act_window.view">
+            <field eval="2" name="sequence"/>
+            <field name="view_mode">form</field>
+            <field name="view_id" ref="stock.view_picking_in_form"/>
+            <field name="act_window_id" ref="action_picking_tree4_picking_to_invoice"/>
+        </record>
+        
         <menuitem action="action_picking_tree4_picking_to_invoice"
             id="menu_action_picking_tree4_picking_to_invoice"
             parent="purchase.menu_procurement_management_invoice" sequence="90"/>

=== modified file 'sale/sale_view.xml'
--- sale/sale_view.xml	2012-01-31 13:36:57 +0000
+++ sale/sale_view.xml	2012-03-20 13:34:23 +0000
@@ -246,8 +246,21 @@
                         <page string="History" groups="base.group_extended">
                             <separator colspan="4" string="Invoices"/>
                             <field colspan="4" name="invoice_ids" nolabel="1" context="{'form_view_ref':'account.invoice_form'}"/>
-                            <separator colspan="4" string="Packings"/>
-                            <field colspan="4" name="picking_ids" nolabel="1"/>
+                            <separator colspan="4" string="Delivery Orders"/>
+                            <field colspan="4" name="picking_ids" nolabel="1" context="{'form_view_ref':'stock.view_picking_out_form', 'default_type': 'out'}">
+                                <tree colors="blue:state == 'draft';grey:state == 'cancel';red:state not in ('cancel', 'done') and min_date &lt; current_date" string="Delivery Orders">
+                                    <field name="name"/>
+                                    <field name="partner_id"/>
+                                    <field name="origin"/>
+                                    <field name="date"/>
+                                    <field name="min_date"/>
+                                    <field name="backorder_id" groups="base.group_extended"/>
+                                    <field name="invoice_state"/>
+                                    <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
+                                    <field name="state"/>
+                                    <button name="action_process" states="assigned" string="Deliver" type="object" icon="gtk-go-forward" context="{'default_type': 'out'}"/>
+                                </tree>
+                            </field>
                         </page>
                     </notebook>
                 </form>

=== modified file 'sale/stock_view.xml'
--- sale/stock_view.xml	2011-12-19 16:54:40 +0000
+++ sale/stock_view.xml	2012-03-20 13:34:23 +0000
@@ -8,7 +8,7 @@
             <field name="inherit_id" ref="stock.view_picking_form"/>
             <field name="arch" type="xml">
                 <field name="auto_picking" position="after">
-                    <field name="sale_id"/>
+                    <field name="sale_id" invisible="1"/>
                 </field>
             </field>
         </record>
@@ -57,9 +57,9 @@
             <field name="type">form</field>
             <field name="inherit_id" ref="stock.view_picking_out_form"/>
             <field name="arch" type="xml">
-                <field name="move_type" position="after">
+                <xpath expr="/form/notebook/page/field[@name='date']"  position="after">
                     <field name="sale_id"/>
-                </field>
+                </xpath>
             </field>
         </record>
 
@@ -74,6 +74,21 @@
             <field name="context">{'default_type': 'out', 'contact_display': 'partner_address', 'search_default_to_invoice': 1, 'search_default_done': 1}</field>
             <field name="search_view_id" ref="stock.view_picking_out_search"/>
         </record>
+        
+       <record id="action_sale_picking_out_tree_view1" model="ir.actions.act_window.view">
+            <field eval="1" name="sequence"/>
+            <field name="view_mode">tree</field>
+            <field name="view_id" ref="stock.view_picking_out_tree"/>
+            <field name="act_window_id" ref="outgoing_picking_list_to_invoice"/>
+        </record>
+
+        <record id="action_sale_picking_out_form_view1" model="ir.actions.act_window.view">
+            <field eval="2" name="sequence"/>
+            <field name="view_mode">form</field>
+            <field name="view_id" ref="stock.view_picking_out_form"/>
+            <field name="act_window_id" ref="outgoing_picking_list_to_invoice"/>
+        </record>
+
         <menuitem action="outgoing_picking_list_to_invoice" id="menu_action_picking_list_to_invoice" parent="base.menu_invoiced" groups="base.group_no_one" sequence="20"/>
 
     </data>

=== modified file 'stock/__openerp__.py'
--- stock/__openerp__.py	2012-02-13 15:27:55 +0000
+++ stock/__openerp__.py	2012-03-20 13:34:23 +0000
@@ -72,8 +72,8 @@
         'wizard/stock_return_picking_view.xml',
         "stock_workflow.xml",
         "stock_incoterms.xml",
+        "stock_report.xml",
         "stock_view.xml",
-        "stock_report.xml",
         "stock_sequence.xml",
         "product_data.xml",
         "product_view.xml",

=== modified file 'stock/stock.py'
--- stock/stock.py	2012-02-28 14:08:16 +0000
+++ stock/stock.py	2012-03-20 13:34:23 +0000
@@ -534,6 +534,14 @@
 #----------------------------------------------------------
 # Stock Picking
 #----------------------------------------------------------
+PICK_STATE = [
+            ('draft', 'New'),
+            ('auto', 'Waiting Another Operation'),
+            ('confirmed', 'Waiting Availability'),
+            ('assigned', 'Ready to Process'),
+            ('done', 'Done'),
+            ('cancel', 'Cancelled'),
+]
 class stock_picking(osv.osv):
     _name = "stock.picking"
     _description = "Picking List"
@@ -613,25 +621,18 @@
         return new_id
 
     _columns = {
-        'name': fields.char('Reference', size=64, select=True),
-        'origin': fields.char('Origin', size=64, help="Reference of the document that produced this picking.", select=True),
-        'backorder_id': fields.many2one('stock.picking', 'Back Order of', help="If this picking was split this field links to the picking that contains the other part that has been processed already.", select=True),
-        'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
-        'note': fields.text('Notes'),
-        'stock_journal_id': fields.many2one('stock.journal','Stock Journal', select=True),
-        'location_id': fields.many2one('stock.location', 'Location', help="Keep empty if you produce at the location where the finished products are needed." \
+        'name': fields.char('Reference', size=64, select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
+        'origin': fields.char('Origin', size=64, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Reference of the document that produced this picking.", select=True),
+        'backorder_id': fields.many2one('stock.picking', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this picking was split this field links to the picking that contains the other part that has been processed already.", select=True),
+        'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', required=True, select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Shipping type specify, goods coming in or going out."),
+        'note': fields.text('Notes', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
+        'stock_journal_id': fields.many2one('stock.journal','Stock Journal', select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
+        'location_id': fields.many2one('stock.location', 'Location', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Keep empty if you produce at the location where the finished products are needed." \
                 "Set a location if you produce at a fixed location. This can be a partner location " \
                 "if you subcontract the manufacturing operations.", select=True),
-        'location_dest_id': fields.many2one('stock.location', 'Dest. Location',help="Location where the system will stock the finished products.", select=True),
-        'move_type': fields.selection([('direct', 'Partial Delivery'), ('one', 'All at once')], 'Delivery Method', required=True, help="It specifies goods to be delivered all at once or by direct delivery"),
-        'state': fields.selection([
-            ('draft', 'New'),
-            ('auto', 'Waiting Another Operation'),
-            ('confirmed', 'Waiting Availability'),
-            ('assigned', 'Ready to Process'),
-            ('done', 'Done'),
-            ('cancel', 'Cancelled'),
-            ], 'State', readonly=True, select=True,
+        'location_dest_id': fields.many2one('stock.location', 'Dest. Location', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Location where the system will stock the finished products.", select=True),
+        'move_type': fields.selection([('direct', 'Partial Delivery'), ('one', 'All at once')], 'Delivery Method', required=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="It specifies goods to be delivered all at once or by direct delivery"),
+        'state': fields.selection(PICK_STATE, 'State', readonly=True, select=True,
             help="* Draft: not confirmed yet and will not be scheduled until confirmed\n"\
                  "* Confirmed: still waiting for the availability of products\n"\
                  "* Available: products reserved, simply waiting for confirmation.\n"\
@@ -639,21 +640,21 @@
                  "* Done: has been processed, can't be modified or cancelled anymore\n"\
                  "* Cancelled: has been cancelled, can't be confirmed anymore"),
         'min_date': fields.function(get_min_max_date, fnct_inv=_set_minimum_date, multi="min_max_date",
-                 store=True, type='datetime', string='Expected Date', select=1, help="Expected date for the picking to be processed"),
-        'date': fields.datetime('Order Date', help="Date of Order", select=True),
-        'date_done': fields.datetime('Date Done', help="Date of Completion"),
+                 store=True, type='datetime', string='Scheduled Date', select=1, help="Expected date for the picking to be processed"),
+        'date': fields.datetime('Order Date', help="Date of Order", select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
+        'date_done': fields.datetime('Date Done', help="Date of Completion", states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
         'max_date': fields.function(get_min_max_date, fnct_inv=_set_maximum_date, multi="min_max_date",
                  store=True, type='datetime', string='Max. Expected Date', select=2),
-        'move_lines': fields.one2many('stock.move', 'picking_id', 'Internal Moves', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
-        'auto_picking': fields.boolean('Auto-Picking'),
-        'address_id': fields.many2one('res.partner.address', 'Address', help="Address of partner"),
+        'move_lines': fields.one2many('stock.move', 'picking_id', 'Internal Moves', states={'done':[('readonly', True)], 'cancel': [('readonly', True)]}),
+        'auto_picking': fields.boolean('Auto-Picking', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
+        'address_id': fields.many2one('res.partner.address', 'Address', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Address of partner"),
         'partner_id': fields.related('address_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True),
         'invoice_state': fields.selection([
             ("invoiced", "Invoiced"),
             ("2binvoiced", "To Be Invoiced"),
             ("none", "Not Applicable")], "Invoice Control",
             select=True, required=True, readonly=True, states={'draft': [('readonly', False)]}),
-        'company_id': fields.many2one('res.company', 'Company', required=True, select=True),
+        'company_id': fields.many2one('res.company', 'Company', required=True, select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
     }
     _defaults = {
         'name': lambda self, cr, uid, context: '/',
@@ -668,23 +669,65 @@
         ('name_uniq', 'unique(name, company_id)', 'Reference must be unique per Company!'),
     ]
 
+    def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
+        if context is None:
+            context = {}
+        type = context.get('default_type', False)
+        res = super(stock_picking, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
+        if type:
+            if res.get('toolbar', False):
+                for report in res['toolbar']['print']:
+                    if report['report_name'] != 'stock.picking.list':
+                        continue
+                    if type == 'in':
+                        report['string'] = 'Incoming Shipment'
+                    elif type == 'internal':
+                        report['string'] = 'Internal Shipment'
+                    elif type == 'out':
+                        report['string'] = 'Delivery Order'
+                    report['name'] = report['string']
+
+            for field in res['fields']:
+                if field == 'state':
+                    _state = []
+                    for key, value in PICK_STATE:
+                        if type == 'in':
+                            if key == 'assigned':
+                                value = 'Ready to Receive'
+                            elif key == 'done':
+                                value = 'Received'
+                        elif type == 'internal':
+                            if key == 'assigned':
+                                value = 'Ready to Move'
+                            elif key == 'done':
+                                value = 'Moved'
+                        elif type == 'out':
+                            if key == 'assigned':
+                                value = 'Ready to Deliver'
+                            elif key == 'done':
+                                value = 'Delivered'
+                        _state.append((key,value))
+                    res['fields']['state']['selection'] = _state
+        return res
+
     def action_process(self, cr, uid, ids, context=None):
-        if context is None: context = {}
-        context = dict(context, active_ids=ids, active_model=self._name)
-        partial_id = self.pool.get("stock.partial.picking").create(cr, uid, {}, context=context)
-        return {
-            'name':_("Products to Process"),
-            'view_mode': 'form',
-            'view_id': False,
-            'view_type': 'form',
-            'res_model': 'stock.partial.picking',
-            'res_id': partial_id,
-            'type': 'ir.actions.act_window',
-            'nodestroy': True,
-            'target': 'new',
-            'domain': '[]',
-            'context': context,
-        }
+            if context is None: context = {}
+            mod_obj = self.pool.get('ir.model.data')
+            model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','stock_partial_picking_form')], context=context)
+            resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
+            ctx = context.copy()
+            ctx.update({'active_model': 'stock.picking', 'active_ids': ids })
+            return {
+                'view_type': 'form',
+                'view_mode': 'form',
+                'res_model': 'stock.partial.picking',
+                'views': [(resource_id,'form')],
+                'view_id': resource_id,
+                'type': 'ir.actions.act_window',
+                'target': 'new',
+                'context': ctx,
+                'nodestroy': True,
+            }
 
     def copy(self, cr, uid, id, default=None, context=None):
         if default is None:
@@ -738,7 +781,10 @@
         """ Changes state of picking to available if all moves are confirmed.
         @return: True
         """
+        wf_service = netsvc.LocalService("workflow")
         for pick in self.browse(cr, uid, ids):
+            if pick.state == 'draft':
+                wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_confirm', cr)
             move_ids = [x.id for x in pick.move_lines if x.state == 'confirmed']
             if not move_ids:
                 raise osv.except_osv(_('Warning !'),_('Not enough stock, unable to reserve the products.'))

=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml	2012-02-13 15:27:55 +0000
+++ stock/stock_view.xml	2012-03-20 13:34:23 +0000
@@ -671,7 +671,7 @@
             <field name="model">stock.picking</field>
             <field name="type">tree</field>
             <field name="arch" type="xml">
-                <tree colors="blue:state == 'draft';grey:state == 'cancel';red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
+                <tree colors="blue:state == 'draft';grey:state == 'cancel';red:state not in ('cancel', 'done') and date &lt; current_date" string="Internal Moves">
                     <field name="name"/>
                     <field name="partner_id" invisible="True"/>
                     <field name="backorder_id" groups="base.group_extended"/>
@@ -681,7 +681,7 @@
                     <field name="invoice_state"/>
                     <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                     <field name="state"/>
-                    <button name="action_process" states="assigned" groups="stock.group_stock_user" string="Process" type="object" icon="gtk-go-forward"/>
+                    <button name="action_process" states="assigned" groups="stock.group_stock_user" string="Move" type="object" icon="gtk-go-forward"/>
                 </tree>
             </field>
         </record>
@@ -696,14 +696,12 @@
                         <group colspan="4" col="4">
                             <field name="name" readonly="1"/>
                             <field name="origin"/>
-                            <field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" colspan="4"/>
+                            <field name="address_id" string="Warehouse" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" colspan="4"/>
                             <field name="invoice_state" string="Invoice Control" groups="base.group_extended"/>
+                        </group>
+                        <group colspan="2" col="2">
                             <field name="backorder_id" readonly="1" groups="base.group_extended"/>
-                        </group>
-                        <group colspan="2" col="2">
-                            <field name="date"/>
                             <field name="min_date" readonly="1"/>
-                            <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                         </group>
                     </group>
                     <notebook colspan="4">
@@ -737,8 +735,9 @@
                                         groups="base.group_extended"
                                         icon="terp-stock_effects-object-colorize"
                                         states="draft,assigned,confirmed"/>
+                                    <field name="location_id"/>
                                     <field name="location_dest_id"/>
-                                    <field name="date_expected" string="Date Expected"/>
+                                    <field name="date_expected" />
                                     <field name="state"/>
                                 </tree>
                                 <form string="Stock Moves">
@@ -798,21 +797,22 @@
                             </field>
                             <group col="10" colspan="4">
                                 <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/>
-                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
-                                <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-apply"/>
-                                <button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/>
-                                <button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/>
+                                <button name="draft_validate" states="draft" string="Move Now" type="object" icon="gtk-media-play"/>
+                                <button name="action_assign" states="draft" string="Check Availability" type="object" icon="gtk-find"/>
                                 <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
-                                <button name="action_process" states="assigned" string="Process"  groups="stock.group_stock_user" type="object" icon="gtk-go-forward"/>
+                                <button name="action_process" states="assigned" string="Move"  groups="stock.group_stock_user" type="object" icon="gtk-go-forward"/>
                                 <button name="%(action_stock_invoice_onshipping)d" string="Create Invoice"  attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}"  type="action" icon="terp-gtk-go-back-rtl" />
+                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
                             </group>
                         </page>
                         <page string="Additional info" groups="base.group_extended,base.group_multi_company">
                             <field name="auto_picking" groups="base.group_extended"/>
-                            <field name="date_done" groups="base.group_extended"/>
+                            <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                             <field name="move_type" groups="base.group_extended"/>
-                            <field name="type" groups="base.group_extended"/>
-                            <field name="company_id" groups="base.group_multi_company" widget="selection"/>
+                            <field name="date"/>
+                            <field name="type" groups="base.group_extended" invisible="1"/>
+                            <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
+                            <field name="date_done" string="Received Date" groups="base.group_extended"/>
                         </page>
                         <page string="Notes">
                             <field colspan="4" name="note" nolabel="1"/>
@@ -875,7 +875,7 @@
                     <field name="invoice_state"/>
                     <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                     <field name="state"/>
-                    <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
+                    <button name="action_process" states="assigned" string="Deliver" type="object" icon="gtk-go-forward"/>
                 </tree>
             </field>
         </record>
@@ -889,12 +889,12 @@
                         <group colspan="4" col="4">
                             <field name="name" readonly="1"/>
                             <field name="origin" readonly="1"/>
-                            <field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" colspan="4"/>
+                            <field name="address_id" string="Customer" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" colspan="4"/>
                             <field name="invoice_state"/>
+                            
+                        </group>
+                        <group colspan="2" col="2">
                             <field name="backorder_id" readonly="1" groups="base.group_extended"/>
-                        </group>
-                        <group colspan="2" col="2">
-                            <field name="date"/>
                             <field name="min_date" readonly="1"/>
                             <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                         </group>
@@ -928,7 +928,7 @@
                                         groups="base.group_extended"
                                         states="draft,assigned,confirmed"/>
                                     <field name="location_id"/>
-                                    <field name="date"/>
+                                    <field name="date_expected"/>
                                     <field name="state"/>
                                     <button name="%(action_partial_move_server)d" string="Process" type="action" states="confirmed,assigned" icon="gtk-go-forward"/>
                                 </tree>
@@ -989,22 +989,23 @@
                             </field>
                             <group col="12" colspan="4">
                                 <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/>
-                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
-                                <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/>
-                                <button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-yes"/>
-                                <button name="action_assign" states="confirmed" string="Check Availability" type="object" groups="base.group_extended" icon="gtk-find"/>
+                                <button name="draft_validate" states="draft" string="Deliver Now" type="object" icon="gtk-media-play"/>
+                                <button name="action_assign" states="draft" string="Check Availability" type="object" groups="base.group_extended" icon="gtk-find"/>
                                 <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
-                                <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
+                                <button name="action_process" states="assigned" string="Deliver" type="object" icon="gtk-go-forward"/>
+                                <button name="%(report_picking_list)d" string="Print Delivery Order" states="done" type="action" icon="gtk-print"/>
                                 <button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/>
                                 <button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}"  type="action" icon="terp-gtk-go-back-rtl"/>
+                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
                             </group>
                         </page>
                         <page string="Additional info" groups="base.group_extended,base.group_multi_company">
                             <field name="auto_picking" groups="base.group_extended"/>
-                            <field name="date_done" groups="base.group_extended"/>
+                            <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                             <field name="move_type" groups="base.group_extended"/>
-                            <field name="type" groups="base.group_extended"/>
-                            <field name="company_id" groups="base.group_multi_company" widget="selection"/>
+                            <field name="date"/>
+                            <field name="date_done" string="Delivery Date" groups="base.group_extended"/>
+                            <field name="type" groups="base.group_extended" invisible="1"/>
                         </page>
                         <page string="Notes">
                             <field colspan="4" name="note" nolabel="1"/>
@@ -1085,7 +1086,7 @@
             <field name="model">stock.picking</field>
             <field name="type">tree</field>
             <field name="arch" type="xml">
-                <tree colors="blue:state == 'draft';grey:state == 'done';red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
+                <tree colors="blue:state == 'draft';grey:state == 'done';red:state not in ('cancel', 'done') and date &lt; current_date" string="Receptions">
                     <field name="name"/>
                     <field name="partner_id" />
                     <field name="backorder_id" groups="base.group_extended"/>
@@ -1095,7 +1096,7 @@
                     <field name="invoice_state" groups="base.group_extended"/>
                     <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                     <field name="state"/>
-                    <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
+                    <button name="action_process" states="assigned" string="Receive" type="object" icon="gtk-go-forward"/>
                     <button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel" confirm="This operation will cancel the shipment. Do you want to continue?" />
                 </tree>
             </field>
@@ -1110,12 +1111,12 @@
                         <group colspan="4" col="4">
                             <field name="name" readonly="1"/>
                             <field name="origin"/>
-                            <field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" domain="[('partner_id','&lt;&gt;',False)]" colspan="4"/>
+                            <field name="address_id" string="Supplier" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" domain="[('partner_id','&lt;&gt;',False)]" colspan="4"/>
                             <field name="invoice_state" string="Invoice Control"/>
+                            
+                        </group>
+                        <group colspan="2" col="2">
                             <field name="backorder_id" readonly="1" groups="base.group_extended"/>
-                        </group>
-                        <group colspan="2" col="2">
-                            <field name="date"/>
                             <field name="min_date" readonly="1"/>
                             <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                         </group>
@@ -1208,19 +1209,20 @@
                                 </form>
                             </field>
                             <group col="10" colspan="4">
-                                <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/>
-                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
-                                <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/>
-                                <button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/>
-                                <button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/>
+                                <field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/>
+                                <button name="draft_validate" states="draft" string="Receive Now" type="object" icon="gtk-media-play"/>
+                                <button name="action_assign" states="draft, confirmed" string="Check Availability" type="object" icon="gtk-find"/>
                                 <button name="force_assign" states="confirmed" string="Force Availability" type="object" groups="base.group_extended" icon="gtk-jump-to"/>
-                                <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
+                                <button name="action_process" states="assigned" string="Receive" type="object" icon="gtk-go-forward"/>
+                                <button name="%(report_picking_list)d" string="Print Reception" type="action" icon="gtk-print" states="done"/>
                                 <button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/>
                                 <button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" icon="terp-gtk-go-back-rtl" />
+                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
                             </group>
                         </page>
                         <page string="Additional Info" groups="base.group_extended,base.group_multi_company">
-                            <field name="type" groups="base.group_extended"/>
+                            <field name="type" groups="base.group_extended" invisible="1"/>
+                            <field name="date"/>
                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                         </page>
                         <page string="Notes">
@@ -1274,7 +1276,7 @@
             <field name="view_type">form</field>
             <field name="view_mode">tree,form,calendar</field>
             <field name="domain">[('type','=','in')]</field>
-            <field name="context">{'contact_display': 'partner_address',"search_default_available":1}</field>
+            <field name="context">{'default_type': 'in', 'contact_display': 'partner_address',"search_default_available":1}</field>
             <field name="search_view_id" ref="view_picking_in_search"/>
             <field name="help">The Incoming Shipments is the list of all orders you will receive from your suppliers. An incoming shipment contains a list of products to be received according to the original purchase order. You can validate the shipment totally or partially.</field>
         </record>
@@ -1805,6 +1807,7 @@
             src_model="product.product"/>
 
         <act_window
+            context="{'default_type': 'internal'}"
             domain="[('move_lines','=',active_id)]"
             id="act_relate_picking"
             name="Related Picking"

=== modified file 'stock/wizard/stock_partial_picking.py'
--- stock/wizard/stock_partial_picking.py	2012-01-31 13:36:57 +0000
+++ stock/wizard/stock_partial_picking.py	2012-03-20 13:34:23 +0000
@@ -20,6 +20,7 @@
 ##############################################################################
 
 import time
+from lxml import etree
 from osv import fields, osv
 from tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
 import decimal_precision as dp
@@ -71,6 +72,32 @@
         'picking_id': fields.many2one('stock.picking', 'Picking', required=True, ondelete='CASCADE'),
         'hide_tracking': fields.function(_hide_tracking, string='Tracking', type='boolean', help='This field is for internal purpose. It is used to decide if the column prodlot has to be shown on the move_ids field or not'),
      }
+    
+    def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
+        if context is None:
+            context={}
+        # remove the entry with key 'form_view_ref', otherwise fields_view_get crashes
+        context.pop('form_view_ref', None)
+        res = super(stock_partial_picking, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
+        type = context.get('default_type', False)
+        if type:
+            doc = etree.XML(res['arch'])
+            for node in doc.xpath("//group/button[@string='_Validate']"):
+                if type == 'in':
+                    node.set('string', '_Receive')
+                elif type == 'internal':
+                    node.set('string', '_Move')
+                elif type == 'out':
+                    node.set('string', '_Deliver')
+            for node in doc.xpath("//separator[@string='Products']"):
+                if type == 'in':
+                    node.set('string', 'Receive Products')
+                elif type == 'internal':
+                    node.set('string', 'Move Products')
+                elif type == 'out':
+                    node.set('string', 'Deliver Products')
+            res['arch'] = etree.tostring(doc)
+        return res
 
     def default_get(self, cr, uid, fields, context=None):
         if context is None: context = {}

_______________________________________________
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

Reply via email to