diff options
| author | Antonin Bourguignon <abo@openerp.com> | 2012-09-11 18:55:05 +0200 |
|---|---|---|
| committer | Antonin Bourguignon <abo@openerp.com> | 2012-09-11 18:55:05 +0200 |
| commit | eff0bbad02b51116ea3ef58bfff677a064560ded (patch) | |
| tree | 37d5ae55253e5474dc1beb9b728864b35e473e42 | |
| parent | 719528e06939face7ab443d0e4f5bfa4bcb02179 (diff) | |
| parent | a161895287e7b4d081c8a075989c15f0a6de6f34 (diff) | |
[IMP] display of stock moves in dropdown lists
bzr revid: abo@openerp.com-20120911165505-6ah1xqfanpaywjjr
| -rw-r--r-- | addons/stock/stock.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 41b4394edbf..e93f9bb34ea 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -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): |
