diff --git a/addons/stock/report/picking.py b/addons/stock/report/picking.py index 2956c5954eb..71a45b06a35 100644 --- a/addons/stock/report/picking.py +++ b/addons/stock/report/picking.py @@ -29,11 +29,13 @@ class picking(report_sxw.rml_parse): super(picking, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'time': time, - 'get_productdesc':self.get_productdesc + 'get_product_desc':self.get_product_desc }) - def get_productdesc(self,code): - code = '[' + code.product_id.default_code + ']' - return [code] + def get_product_desc(self,move_line): + desc = move_line.product_id.name + if move_line.product_id.default_code: + desc = '[' + move_line.product_id.default_code + ']' + ' ' + desc + return [desc] report_sxw.report_sxw('report.stock.picking.list','stock.picking','addons/stock/report/picking.rml',parser=picking) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index 688f879f14e..dfb202b75ff 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -251,8 +251,8 @@ - [[ repeatIn(get_productdesc(move_lines),'desc') ]] - [[ desc ]] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] + [[ repeatIn(get_product_desc(move_lines),'desc') ]] + [[ desc ]] [[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]] @@ -277,7 +277,8 @@ - [ [[ (move_lines.product_id.default_code) or removeParentNode('font') ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] + [[ repeatIn(get_product_desc(move_lines),'desc') ]] + [[ desc ]] [[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]