diff --git a/addons/stock/report/picking.py b/addons/stock/report/picking.py index 29a53fba7a2..71a45b06a35 100644 --- a/addons/stock/report/picking.py +++ b/addons/stock/report/picking.py @@ -29,7 +29,13 @@ class picking(report_sxw.rml_parse): super(picking, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'time': time, + 'get_product_desc':self.get_product_desc }) + 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 5f395c9f005..4bbb6fecead 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -162,12 +162,14 @@ Customer Address : [[ (picking.type == 'out' or removeParentNode('para')) and '' ]] Warehouse Address : [[ (picking.type == 'internal' or removeParentNode('para')) and '' ]] [[ (picking.partner_id and picking.partner_id.id and picking.partner_id.title.name) or '' ]] [[ picking.partner_id and picking.partner_id.id and picking.partner_id.name ]] - [[ picking.partner_id and display_address(picking.partner_id,'delivery') ]] + [[ picking.partner_id and display_address(picking.partner_id) ]] + [[ picking.partner_id.phone or picking.partner_id.email]] Contact Address : [[ picking.partner_id and picking.partner_id.title.name or '' ]] [[ picking.partner_id and picking.partner_id.name or '' ]] - [[ picking.partner_id and display_address(picking.partner_id,'default') ]] + [[ picking.partner_id and display_address(picking.partner_id) ]] + [[ picking.partner_id.phone or picking.partner_id.email]] @@ -189,7 +191,7 @@ - + Journal @@ -198,17 +200,14 @@ Order(Origin) - Recipient - - - Expected Shipping Date + Schedule Date Weight - + [[ picking.stock_journal_id.name]] @@ -216,9 +215,6 @@ [[ picking.origin or '']] - - [[ (picking.partner_id and picking.partner_id.title.name) or '' ]] [[ (picking.partner_id and picking.partner_id.name) or '' ]] - [[ formatLang(picking.min_date,date_time = True) ]] @@ -236,7 +232,7 @@ Description - Lot + Serial Number Status @@ -255,7 +251,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 '' ]] @@ -280,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 '' ]] diff --git a/addons/stock/stock_report.xml b/addons/stock/stock_report.xml index 540e6a8f902..c548317a3ba 100644 --- a/addons/stock/stock_report.xml +++ b/addons/stock/stock_report.xml @@ -3,7 +3,7 @@ - +