[IMP] display of stock moves in dropdown lists

bzr revid: abo@openerp.com-20120911165505-6ah1xqfanpaywjjr
This commit is contained in:
Antonin Bourguignon 2012-09-11 18:55:05 +02:00
commit eff0bbad02
1 changed files with 7 additions and 1 deletions

View File

@ -1577,7 +1577,13 @@ class stock_move(osv.osv):
def name_get(self, cr, uid, ids, context=None):
res = []
for line in self.browse(cr, uid, ids, context=context):
res.append((line.id, (line.picking_id.origin or '/')+ ' ' +(line.product_id.code or '/')+': '+line.location_id.name+' > '+line.location_dest_id.name))
name = line.location_id.name+' > '+line.location_dest_id.name
# optional prefixes
if line.product_id.code:
name = line.product_id.code + ': ' + name
if line.picking_id.origin:
name = line.picking_id.origin + '/ ' + name
res.append((line.id, name))
return res
def _check_tracking(self, cr, uid, ids, context=None):