From cc49eeb504011101f4b51dd52117ec6bc77bf2db Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Wed, 21 Mar 2012 16:44:45 +0530 Subject: [PATCH 1/2] [IMP]stock: Improved help tool tip according to Delivery, reception and Internal moves bzr revid: mma@tinyerp.com-20120321111445-au31xs1x61t5ti3b --- addons/stock/stock.py | 19 ++++++++++++++----- addons/stock/stock_view.xml | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 6da517803c1..eb4d7a7af61 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -622,8 +622,8 @@ class stock_picking(osv.osv): _columns = { '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), + 'origin': fields.char('Origin', size=64, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Reference of the document", select=True), + 'backorder_id': fields.many2one('stock.picking', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", 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)]}), @@ -631,7 +631,7 @@ class stock_picking(osv.osv): "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', 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"), + 'move_type': fields.selection([('direct', 'Partial'), ('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"\ @@ -640,8 +640,8 @@ class stock_picking(osv.osv): "* 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='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)]}), + store=True, type='datetime', string='Scheduled Date', select=1, help="Scheduled date for the shipment 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), @@ -708,6 +708,15 @@ class stock_picking(osv.osv): value = 'Delivered' _state.append((key,value)) res['fields']['state']['selection'] = _state + if field == 'address_id': + _tooltip = '' + if type == 'in': + _tooltip = "supplier" + elif type == 'internal': + _tooltip="warehouse" + elif type == 'out': + _tooltip="customer" + res['fields']['address_id']['help'] = "Address of %s" %(_tooltip) return res def action_process(self, cr, uid, ids, context=None): diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 99afacb624a..17822664998 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -808,7 +808,7 @@ - + From 535620c7cf6d5cc9c1a696ff0330d9be25202e66 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Wed, 21 Mar 2012 17:13:30 +0530 Subject: [PATCH 2/2] [IMP]stock: Improved help tool tip of move_type bzr revid: mma@tinyerp.com-20120321114330-piyznek1w63saeh7 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index eb4d7a7af61..2b6d1379279 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -631,7 +631,7 @@ class stock_picking(osv.osv): "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', 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'), ('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"), + 'move_type': fields.selection([('direct', 'Partial'), ('one', 'All at once')], 'Delivery Method', required=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="It specifies goods to be deliver partially or all at once"), '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"\