From 633d7c07a6cc1fe6f74ac3541e3b808d831abb92 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 13 Oct 2008 14:54:06 +0530 Subject: [PATCH 1/3] Picking List prob Solved..(Rana Vinay) bzr revid: patelamit2003@gmail.com-20081013092406-7bp7h5rdfc41r1vg --- addons/stock/report/picking.rml | 89 +++++++++++++++++++++++++++------ 1 file changed, 75 insertions(+), 14 deletions(-) diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index 23c9be50dea..7716dcf9aa7 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -61,7 +61,17 @@ - + + + + + + + + + + + @@ -103,7 +113,7 @@ - + @@ -187,38 +197,39 @@ - + - - Product - Description Lot + + State + Qty - Location + Location +
[[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') ]] - + - [[ move_lines.product_id.default_code ]] - - - [[ move_lines.product_id.name ]] + [ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]] + + [[ move_lines.state ]] + [[ move_lines.product_qty ]] @@ -226,13 +237,63 @@ [[ move_lines.product_uom.name ]] - [[ (move_lines.location_id and move_lines.location_id.name) or '' ]] + [[ (move_lines.location_id and move_lines.location_id.name) or '' ]] - +
+ + + + Non Assigned Products: + + + +
+ [[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]] + + + + [ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] + + + [[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]] + + + [[ move_lines.state ]] + + + [[ move_lines.product_qty ]] + + + [[ move_lines.product_uom.name ]] + + + [[ (move_lines.location_id and move_lines.location_id.name) or '' ]] + + + + + + +
+ + + + + + + + + + + + + + + From 4d22b0a78c884081713c09230cf5692d8115cb5b Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 13 Oct 2008 15:15:20 +0530 Subject: [PATCH 2/3] Delivery Order : can you keep just one column Description that will contain [code]description-- Solved bzr revid: patelamit2003@gmail.com-20081013094520-rsgt51t2f3vvk868 --- addons/sale/report/shipping.rml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/addons/sale/report/shipping.rml b/addons/sale/report/shipping.rml index 9deafa95de1..0ef8f03addb 100644 --- a/addons/sale/report/shipping.rml +++ b/addons/sale/report/shipping.rml @@ -62,7 +62,6 @@ -
@@ -73,7 +72,6 @@ - @@ -196,11 +194,8 @@ - + - - Reference - Designation @@ -223,13 +218,10 @@
[[ repeatIn(o.move_lines,'line') ]] - + - [[line.product_id.code ]] - - - [[ line.product_id and line.product_id.name or '']] + [[line.product_id.code ]] [[ line.product_id and line.product_id.name or '']] [[ (line.prodlot_id and line.prodlot_id.name) or ' ' ]] @@ -244,7 +236,7 @@ [[ '%.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') ]] + [[ '%.2f' %((line.sale_line_id and line.sale_line_id.price_subtotal) or (line.product_qty*line.product_id.lst_price) or '0.00') ]] @@ -276,7 +268,7 @@ Total : - [[ '%.2f' % (o.sale_id and o.sale_id.amount_total or sum_total(o) or '0.00') ]] + [[ '%.2f' % (o.sale_id and o.sale_id.amount_total or sum_total(o) or '0.00') ]] @@ -284,4 +276,4 @@ - + \ No newline at end of file From 4a2c91d9317c1aac6dc0ee7749bac4e10b144e19 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 13 Oct 2008 15:58:44 +0530 Subject: [PATCH 3/3] Delivery Order Completed.... bzr revid: patelamit2003@gmail.com-20081013102844-3fllyrgez5qdq4jq --- addons/sale/report/shipping.py | 20 +++++------ addons/sale/report/shipping.rml | 64 +++------------------------------ 2 files changed, 14 insertions(+), 70 deletions(-) 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') ]] - - -