diff --git a/addons/sale/report/shipping.py b/addons/sale/report/shipping.py index ecfaba91eba..7ecbe6bff9d 100644 --- a/addons/sale/report/shipping.py +++ b/addons/sale/report/shipping.py @@ -16,17 +16,17 @@ class shipping(report_sxw.rml_parse): super(shipping, self).__init__(cr, uid, name, context) self.localcontext.update({ 'time': time, - 'sum_total': self._sum_total, +# 'sum_total': self._sum_total, }) - def _sum_total(self,data): - print "======data=======",data['id'] - self.cr.execute("SELECT sum(pt.list_price*sm.product_qty) FROM stock_picking as sp "\ - "LEFT JOIN stock_move sm ON (sp.id = sm.picking_id) "\ - "LEFT JOIN product_product pp ON (sm.product_id = pp.id) "\ - "LEFT JOIN product_template pt ON (pp.product_tmpl_id = pt.id) "\ - "WHERE sm.picking_id = %d "%(data['id'])) - sum_total = self.cr.fetchone()[0] or 0.00 - return sum_total +# def _sum_total(self,data): +# print "======data=======",data['id'] +# self.cr.execute("SELECT sum(pt.list_price*sm.product_qty) FROM stock_picking as sp "\ +# "LEFT JOIN stock_move sm ON (sp.id = sm.picking_id) "\ +# "LEFT JOIN product_product pp ON (sm.product_id = pp.id) "\ +# "LEFT JOIN product_template pt ON (pp.product_tmpl_id = pt.id) "\ +# "WHERE sm.picking_id = %d "%(data['id'])) +# sum_total = self.cr.fetchone()[0] or 0.00 +# return sum_total report_sxw.report_sxw('report.sale.shipping','stock.picking','addons/sale/report/shipping.rml',parser=shipping) diff --git a/addons/sale/report/shipping.rml b/addons/sale/report/shipping.rml index 0ef8f03addb..3e8f1105cde 100644 --- a/addons/sale/report/shipping.rml +++ b/addons/sale/report/shipping.rml @@ -60,8 +60,6 @@ - - @@ -70,20 +68,6 @@ - - - - - - - - - - - - - - @@ -194,7 +178,7 @@ - + Designation @@ -203,13 +187,7 @@ Lot - Quantity - - - Unit Price - - - Price + Quantity @@ -218,13 +196,13 @@
[[ repeatIn(o.move_lines,'line') ]] - + [[line.product_id.code ]] [[ line.product_id and line.product_id.name or '']] - [[ (line.prodlot_id and line.prodlot_id.name) or ' ' ]] + [[ (line.prodlot_id and line.prodlot_id.name) or ' ' ]] [[ line.product_qty ]] @@ -232,46 +210,12 @@ [[ line.product_uom and line.product_uom.name ]] - - [[ '%.2f' %((line.sale_line_id and line.sale_line_id.price_unit) or (line.product_id.lst_price) or '0.00') ]] - - - [[ '%.2f' %((line.sale_line_id and line.sale_line_id.price_subtotal) or (line.product_qty*line.product_id.lst_price) or '0.00') ]] -
- - - - - - - - - Net Total : - - - [[ '%.2f' %(o.sale_id and o.sale_id.amount_untaxed or sum_total(o) or '0.00') ]] - - - - - - - - - - Total : - - - [[ '%.2f' % (o.sale_id and o.sale_id.amount_total or sum_total(o) or '0.00') ]] - - -