[FIX]stock: fix a bug in get_quant_name when there is no code defined on product and no lot

bzr revid: csn@openerp.com-20130808132102-d0xx8hgqmd4l2ccb
This commit is contained in:
Cedric Snauwaert
2013-08-08 15:21:02 +02:00
parent 6cdf121d50
commit d20cfc65bd
+2 -1
View File
@@ -140,7 +140,8 @@ class stock_quant(osv.osv):
"""
res = {}
for q in self.browse(cr, uid, ids, context=context):
res[q.id] = q.product_id.code
res[q.id] = q.product_id.code or ''
if q.lot_id:
res[q.id] = q.lot_id.name
res[q.id] += ': '+ str(q.qty) + q.product_id.uom_id.name