[IMP] stock : Improved the code

bzr revid: mdi@tinyerp.com-20120315070809-j84m07ix3in1djem
This commit is contained in:
Divyesh Makwana (Open ERP)
2012-03-15 12:38:09 +05:30
parent f3b0670e69
commit ed11d8407d
+7 -6
View File
@@ -675,12 +675,13 @@ class stock_picking(osv.osv):
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 res.get('toolbar', False):
for i in xrange(0, len(res['toolbar']['print'])):
if type == 'in':
res['toolbar']['print'][i]['string'] = 'Incoming Shipment/Receipt'
elif type == 'internal':
res['toolbar']['print'][i]['string'] = 'Internal Shipment'
elif type == 'out':
res['toolbar']['print'][i]['string'] = 'Delivery Order'
if res['toolbar']['print'][i]['name'] == 'Packing list':
if type == 'in':
res['toolbar']['print'][i]['string'] = 'Incoming Shipment/Receipt'
elif type == 'internal':
res['toolbar']['print'][i]['string'] = 'Internal Shipment'
elif type == 'out':
res['toolbar']['print'][i]['string'] = 'Delivery Order'
for field in res['fields']:
if field == 'state':