From 92f82f0f0528b64209bbae0192c4d363739383c9 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Wed, 10 Sep 2008 16:39:28 +0530 Subject: [PATCH 01/36] Commited Final Delivery Order Report bzr revid: patelamit2003@gmail.com-20080910110928-jmlh3hsvecpqe8nv --- addons/sale/report/shipping.rml | 125 +++++++++++++++++++++++++------- 1 file changed, 99 insertions(+), 26 deletions(-) diff --git a/addons/sale/report/shipping.rml b/addons/sale/report/shipping.rml index 1eb49c91d61..82b3eac3cc0 100644 --- a/addons/sale/report/shipping.rml +++ b/addons/sale/report/shipping.rml @@ -2,7 +2,7 @@ @@ -14,7 +14,7 @@ - + @@ -27,11 +27,14 @@ - + + + + - + @@ -44,31 +47,52 @@ - + + + + - + + + - + + + + + + + + + + + + + + + + - + + @@ -99,6 +123,7 @@ + @@ -118,7 +143,6 @@ [[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.country_id and o.sale_id.partner_invoice_id.country_id.name or '']] - Shipped to [[ o.sale_id and o.sale_id.partner_shipping_id and o.sale_id.partner_shipping_id.name or '']] [[ o.sale_id and o.sale_id.partner_shipping_id and o.sale_id.partner_shipping_id.street or '']] [[ o.sale_id and o.sale_id.partner_shipping_id and o.sale_id.partner_shipping_id.zip or '']] @@ -127,17 +151,11 @@ - + Delivery Order : [[ o.name ]] + - Delivery order [[ o.sale_id and o.sale_id.name ]] - - - - - - - + Order Ref. @@ -151,9 +169,12 @@ Carrier + + Weight + - + [[ o.sale_id and o.sale_id.name ]] @@ -167,12 +188,15 @@ [[ o.carrier_id and o.carrier_id.name or '' ]] + + [[ o.weight ]] + - + - + Reference @@ -180,17 +204,26 @@ Designation + + Lot + Quantity - S.U. + Unit Price + + + Price + + +
- [[ repeatIn(o.move_lines, 'line') ]] - + [[ repeatIn(o.move_lines,'line') ]] + [[line.product_id.code ]] @@ -199,10 +232,19 @@ [[ line.product_id and line.product_id.name or '']] - [[ line.product_qty ]] + [[ (line.prodlot_id and line.prodlot_id.name) or ' ' ]] - [[ line.product_uom and line.product_uom.name ]] + [[ line.product_qty ]] + + + [[ line.product_uom and line.product_uom.name ]] + + + [[ line.sale_line_id.price_unit ]] + + + [[ line.sale_line_id.price_subtotal ]] @@ -210,5 +252,36 @@
+ + + + + + + + + Net Total : + + + [[ o.sale_id.amount_untaxed ]] + + + + + + + + + + Total : + + + [[ o.sale_id.amount_total ]] + + + + + +
From 388180a4186c298cd9b4766709a9cb295c9c094e Mon Sep 17 00:00:00 2001 From: Vinay Rana Date: Wed, 10 Sep 2008 17:24:09 +0530 Subject: [PATCH 03/36] doing some changes in report picking sxw and rml bzr revid: vinusoft85@gmail.com-20080910115409-tg7h1l3vdtrzlkmj --- addons/stock/report/picking.rml | 89 +++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 33 deletions(-) diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index c63cf19f19c..214d44a4ff7 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -10,7 +10,11 @@ - + + + + + @@ -70,15 +74,14 @@ - - - + + @@ -95,83 +98,103 @@ - + + - [[ repeatIn(objects,'picking') ]] + [[ repeatIn(objects,'picking') ]] + [[ setLang((picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.lang)) ]] - + - + - Shipping Address: + Address: [[ (picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.title) or '' ]] [[ picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.name ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]] - [[ (picking.sale_id and picking.sale_id_id.partner_shipping_id and picking.sale_id.partner_shipping_id.zip) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]] - [[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]] + [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.zip) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]] + [[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]] - - - - Packing List - + - + + + + + + + - Customer Ref. + Packing List: [[ picking.name ]] + + + + + + + + + + Order(Origin) Recipient - Concerns + Expected Shipping Date - Packing Date + weight - + - [[ (picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.id) or '' ]] + [[ picking.origin ]] - [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] + [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] - [[ picking.name ]] + [[ picking.date ]] - [[ picking.date]] + [[ picking.weight or '']] - + - + + + + + + + Product @@ -180,19 +203,19 @@ Description - Tracking + Lot Qty - Location + Location
- [[ repeatIn(picking.move_lines,'move_lines') ]] - + [[ repeatIn(picking.move_lines,'move_lines') ]] + [[ move_lines.product_id.default_code ]] @@ -201,7 +224,7 @@ [[ move_lines.product_id.name ]] - [[ (move_lines.tracking_id and move_lines.tracking_id.name) or '']] + [[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]] [[ move_lines.product_qty ]] @@ -210,7 +233,7 @@ [[ 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 '' ]] From d586e402d12d9ad59bcd3c58f6fb554e1b09d818 Mon Sep 17 00:00:00 2001 From: Vinay Rana Date: Wed, 10 Sep 2008 17:39:16 +0530 Subject: [PATCH 05/36] doing some changes in report picking sxw and rml bzr revid: vinusoft85@gmail.com-20080910120916-39ld72dd89lu1nac --- addons/stock/report/picking.rml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index 214d44a4ff7..2c572712d8c 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -122,7 +122,6 @@ - Address: [[ (picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.title) or '' ]] [[ picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.name ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]] @@ -194,7 +193,7 @@ - + Product @@ -209,13 +208,13 @@ Qty - Location + Location
[[ repeatIn(picking.move_lines,'move_lines') ]] - + [[ move_lines.product_id.default_code ]] @@ -233,7 +232,7 @@ [[ 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 '' ]] From e8e59800b2969e558b4f9778b491434f3f5917f0 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Wed, 10 Sep 2008 19:21:25 +0530 Subject: [PATCH 06/36] Note Prob Solved in purchase order and req for quotation bzr revid: patelamit2003@gmail.com-20080910135125-vjmxehwqx7xz7556 --- addons/purchase/report/order.rml | 39 +++++++-------- addons/purchase/report/request_quotation.rml | 52 ++++++-------------- 2 files changed, 33 insertions(+), 58 deletions(-) diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml index 689a9413e6f..8c5ab1c429b 100644 --- a/addons/purchase/report/order.rml +++ b/addons/purchase/report/order.rml @@ -95,8 +95,8 @@ - - + + @@ -141,32 +141,32 @@ [[ repeatIn(o.dest_address_id and [o.dest_address_id] or [],'addr') ]] Shipping address : - [[ o.partner_id.title or '' ]][[ o.partner_id.name ]] - [[ addr.title or '' ]][[ addr.name ]] + [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]] + [[ addr.title or '' ]] [[ addr.name ]] [[ addr.street ]] [[ addr.street2 or '' ]] - [[ addr.zip or '' ]][[ addr.city or '' ]] - [[ addr.state_id and addr.state_id.name or '' ]] + [[ addr.zip or '' ]] [[ addr.city or '' ]] + [[ addr.state_id and addr.state_id.name or '' ]] [[ addr.country_id and addr.country_id.name or '' ]] - [[ o.partner_id.title or '' ]][[ o.partner_id.name ]] - [[ o.partner_address_id.title or '' ]][[ o.partner_address_id.name ]] + [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]] + [[ o.partner_address_id.title or '' ]] [[ o.partner_address_id.name ]] [[ o.partner_address_id.street ]] [[ o.partner_address_id.street2 or '' ]] - [[ o.partner_address_id.zip or '' ]][[ o.partner_address_id.city or '' ]] - [[ o.partner_address_id.state_id and o.partner_address_id.state_id.name or '' ]] + [[ o.partner_address_id.zip or '' ]] [[ o.partner_address_id.city or '' ]] + [[ o.partner_address_id.state_id and o.partner_address_id.state_id.name or '' ]] [[ o.partner_address_id.country_id and o.partner_address_id.country_id.name or '' ]] Tél. : [[ o.partner_address_id.phone or '' ]] Fax : [[ o.partner_address_id.fax or '' ]] - TVA :[[ o.partner_id.vat or '' ]] + TVA :[[ o.partner_id.vat or '' ]] - Request for Quotation [[ (o.state=='draft' or removeParentNode('font')) and '' ]] Order [[ (o.state<>'draft' or removeParentNode('font')) and '' ]] N° :[[ o.name ]] + Request for Quotation [[ (o.state=='draft' or removeParentNode('font')) and '' ]] Order [[ (o.state<>'draft' or removeParentNode('font')) and '' ]] N° :[[ o.name ]] @@ -195,13 +195,13 @@ [[ o.name or '' ]] - [[ o.partner_ref or '' ]] + [[ o.partner_ref or '' ]] [[ time.strftime('%d/%m/%Y', time.strptime(o.date_order, '%Y-%m-%d')) ]] - [[ o.validator and o.validator.name or '' ]] + [[ o.validator and o.validator.name or '' ]] @@ -244,7 +244,7 @@ [[ time.strftime('%d/%m/%Y', time.strptime( line.date_planned, '%Y-%m-%d')) ]] - [[ line.product_qty ]] + [[ line.product_qty ]] [[ line.product_uom.name ]] @@ -258,8 +258,7 @@ - [[ repeatIn((line.notes and line.notes.splitlines()) or [], 'l') ]] - [[ l or removeParentNode('table') ]] + [[ line.notes or removeParentNode('tr') ]] @@ -308,7 +307,7 @@ [[ o.amount_untaxed ]] - [[ o.pricelist_id.currency_id.name ]] + [[ o.pricelist_id.currency_id.name ]] @@ -324,7 +323,7 @@ [[ o.amount_tax ]] - [[ o.pricelist_id.currency_id.name ]] + [[ o.pricelist_id.currency_id.name ]] @@ -334,7 +333,7 @@ - Total : + Total : [[ o.amount_total ]] diff --git a/addons/purchase/report/request_quotation.rml b/addons/purchase/report/request_quotation.rml index 6b39f7084b3..8682fd7bcf0 100644 --- a/addons/purchase/report/request_quotation.rml +++ b/addons/purchase/report/request_quotation.rml @@ -29,14 +29,11 @@ - - - - + @@ -68,6 +65,7 @@ + @@ -100,30 +98,20 @@ - + Request for quotation : [[order.name]] - - - - - - - Please find hereby a request for quotation. - - - - + Description - Date + Expected Date Qty @@ -132,13 +120,13 @@
[[ repeatIn(order.order_line,'order_line') ]] - + [[ order_line.name ]] - [[ time.strftime('%d/%m/%Y', time.strptime( order_line.date_planned, '%Y-%m-%d')) ]] + [[ time.strftime('%d/%m/%Y', time.strptime( order_line.date_planned, '%Y-%m-%d')) ]] [[ order_line.product_qty or '' ]] @@ -149,23 +137,7 @@ - [[ repeatIn((order_line.notes and order_line.notes.splitlines()) or [], 'l') ]] - [[ l or removeParentNode('table') ]] - - - - - - - - - - - - - - - + [[ order_line.notes or removeParentNode('tr') ]] @@ -173,11 +145,15 @@ - [[ order.notes or '' ]] + [[ format(order.notes or '') ]] - Thanks, + Regards, + [[ user.name or '' ]] + + + From 809673d74d6191d7c017a8b6f74fee6d1e136fab Mon Sep 17 00:00:00 2001 From: Vinay Rana Date: Thu, 11 Sep 2008 10:29:27 +0530 Subject: [PATCH 07/36] doing some changes related to space between table in picking report sxw and rml of stock module bzr revid: vinusoft85@gmail.com-20080911045927-3f91xclkyqfuoc6y --- addons/stock/report/picking.rml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index 2c572712d8c..9a3cdaf5a64 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -184,13 +184,7 @@ - - - - - - - + From 9fda5a9da010650541eba684a4c1d9c651b69d71 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Thu, 11 Sep 2008 11:20:31 +0530 Subject: [PATCH 08/36] Small changes in purchase order qty column bzr revid: patelamit2003@gmail.com-20080911055031-30ph2fyordg0q928 --- addons/purchase/report/order.rml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml index 8c5ab1c429b..6ec47152f01 100644 --- a/addons/purchase/report/order.rml +++ b/addons/purchase/report/order.rml @@ -208,7 +208,7 @@ - + Description @@ -232,7 +232,7 @@
[[ repeatIn(o.order_line,'line') ]] - + [[ line.name ]] @@ -293,7 +293,7 @@
- + From f3c9b3cd89ec3e2a92e67403835553228e84cdf8 Mon Sep 17 00:00:00 2001 From: Vinay Rana Date: Thu, 11 Sep 2008 11:53:49 +0530 Subject: [PATCH 10/36] doing some changes in invoice report sxw and rml bzr revid: vinusoft85@gmail.com-20080911062349-lrt64zr1smdn3uqq --- addons/account/report/invoice.rml | 71 ++++++++++++------------------- 1 file changed, 28 insertions(+), 43 deletions(-) diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml index 1962a14a20b..ef8924373fc 100644 --- a/addons/account/report/invoice.rml +++ b/addons/account/report/invoice.rml @@ -127,7 +127,7 @@ - + @@ -137,8 +137,6 @@ - - @@ -148,24 +146,16 @@ - - - - - - - - - - - - - + + + + + @@ -181,32 +171,22 @@ - + - - - - - + - + - - - - - - @@ -215,6 +195,9 @@ + + + @@ -477,11 +460,11 @@ - + [[ format(o.amount_tax or removeParentNode('blockTable')) ]] - + Tax @@ -498,16 +481,11 @@
- - - - - [[ repeatIn(o.tax_line,'t') ]] - + [[ t.name ]] @@ -521,16 +499,23 @@ + + - + - + - + + + + + + @@ -539,15 +524,15 @@ - + - + - + From 280270b40210fb1225fde32d903cc4d5c41e6b11 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Thu, 11 Sep 2008 13:09:25 +0530 Subject: [PATCH 11/36] note prob solved in sale order.... bzr revid: patelamit2003@gmail.com-20080911073925-tf3sh4s1abc6megk --- addons/sale/report/order.rml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml index 2283465f634..0357bd37d4b 100644 --- a/addons/sale/report/order.rml +++ b/addons/sale/report/order.rml @@ -97,7 +97,7 @@ - + @@ -265,8 +265,7 @@ - [[ repeatIn((line.notes and line.notes.splitlines()) or [], 'l') ]] - [[ l or removeParentNode('table') ]] + [[ line.notes or removeParentNode('tr') ]] From e8a4433615f6940aee30406cf0d4eeb0fbf23b8d Mon Sep 17 00:00:00 2001 From: Vinay Rana Date: Thu, 11 Sep 2008 14:25:29 +0530 Subject: [PATCH 12/36] doing some changes related to space in picking sxw and rml in stock module bzr revid: vinusoft85@gmail.com-20080911085529-oppcxvfydfd97928 --- addons/stock/report/picking.rml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index 9a3cdaf5a64..41aa704f374 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -104,7 +104,7 @@ - + @@ -187,7 +187,7 @@ - + Product @@ -208,7 +208,7 @@
[[ repeatIn(picking.move_lines,'move_lines') ]] - + [[ move_lines.product_id.default_code ]] From 34e3786eb452807c7cdda5a2cdd74e4a45ac2b26 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Thu, 11 Sep 2008 18:29:02 +0530 Subject: [PATCH 13/36] Space between notes prob solved in sale order... bzr revid: patelamit2003@gmail.com-20080911125902-hxapajg2u5erzn2l --- addons/sale/report/order.rml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml index 0357bd37d4b..e8a209a3e2a 100644 --- a/addons/sale/report/order.rml +++ b/addons/sale/report/order.rml @@ -97,7 +97,7 @@ - + @@ -130,6 +130,7 @@ + @@ -265,7 +266,7 @@ - [[ line.notes or removeParentNode('tr') ]] + [[ format(line.notes or removeParentNode('tr')) ]] From cd725bb014efc45176517eaf7428826743d470d5 Mon Sep 17 00:00:00 2001 From: Vinay Rana Date: Fri, 12 Sep 2008 10:41:40 +0530 Subject: [PATCH 15/36] doing some changes related to title and notes of product in invoice report sxw and rml bzr revid: vinusoft85@gmail.com-20080912051140-xbj2wkl0hc3kfq4y --- addons/account/report/invoice.rml | 40 ++++++++++++++----------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml index ef8924373fc..7b82cb44bd9 100644 --- a/addons/account/report/invoice.rml +++ b/addons/account/report/invoice.rml @@ -195,9 +195,6 @@ - - - @@ -279,7 +276,7 @@ Invoice Date - Partner Code + Partner Ref. @@ -299,7 +296,7 @@ - + Description @@ -317,13 +314,13 @@ Disc. (%) - Price + Price
[[ repeatIn(o.invoice_line,'l') ]] - + [[ l.name ]] @@ -352,41 +349,43 @@ - [[ repeatIn((l.note and l.note.splitlines()) or [], 'note') ]] - [[ note or removeParentNode('para') ]] - - - + [[ format(l.note or removeParentNode('tr')) ]] + - + - + - + - + - + - + + + + + + @@ -502,7 +501,7 @@ - + @@ -558,8 +557,5 @@ - - - From ca11fd293dbedca22aaf00fb41155f8bbe8c4f76 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Fri, 12 Sep 2008 11:59:20 +0530 Subject: [PATCH 16/36] Small changes in sale order bzr revid: patelamit2003@gmail.com-20080912062920-8asu0gjatk2hl7ta --- addons/sale/report/order.rml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml index e8a209a3e2a..4ffff03f575 100644 --- a/addons/sale/report/order.rml +++ b/addons/sale/report/order.rml @@ -134,7 +134,7 @@ - [[ repeatIn(objects,'o') ]] [[ setLang(o.partner_id.lang) ]] + [[ repeatIn(objects,'o') ]][[ setLang(o.partner_id.lang) ]] @@ -312,7 +312,7 @@ Net Total : - 0.00 + [[ o.amount_untaxed ]] [[ o.pricelist_id.currency_id.name ]] @@ -328,7 +328,7 @@ Taxes : - 0.00 + [[ o.amount_tax ]] [[ o.pricelist_id.currency_id.name ]] From 58b598ea9ee632d9194bc08bd5bad7a25325266d Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Fri, 12 Sep 2008 17:20:15 +0530 Subject: [PATCH 17/36] Completed Sale order and Request for Quotation..... bzr revid: patelamit2003@gmail.com-20080912115015-4zprhr01xz8dgxra --- addons/purchase/report/request_quotation.rml | 18 +++++++++++++----- addons/sale/report/order.rml | 11 +++++++---- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/addons/purchase/report/request_quotation.rml b/addons/purchase/report/request_quotation.rml index 8682fd7bcf0..095be6af582 100644 --- a/addons/purchase/report/request_quotation.rml +++ b/addons/purchase/report/request_quotation.rml @@ -66,6 +66,7 @@ + @@ -74,6 +75,13 @@ + Expected Delivery address: + [[( order.warehouse_id and order.warehouse_id.name) or order.partner_address_id.partner_id.name]] + [[ (order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.title) or ' ']] [[ (order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.name) or order.partner_address_id.name ]] + [[ (order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.street) or order.partner_address_id.street ]] + [[ (order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.street2) or order.partner_address_id.street2 ]] + [[ (order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.zip) or order.partner_address_id.zip ]] [[ (order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.city) or order.partner_address_id.city ]] + [[(order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.state_id and order.warehouse_id.partner_address_id.state_id.name) or order.partner_address_id.state_id.name ]] [[(order.warehouse_id and order.warehouse_id.partner_address_id and order.warehouse_id.partner_address_id.country_id and order.warehouse_id.partner_address_id.country_id.name) or order.partner_address_id.country_id.name ]] @@ -101,7 +109,7 @@ - Request for quotation : [[order.name]] + Request for Quotation : [[order.name]] @@ -137,7 +145,7 @@ - [[ order_line.notes or removeParentNode('tr') ]] + [[ format(order_line.notes or removeParentNode('tr')) ]] @@ -150,11 +158,11 @@ Regards, - [[ user.name or '' ]] - + - + [[ user.name or '' ]] + [[ user.signature or '' ]] diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml index 4ffff03f575..a5a29a6f38c 100644 --- a/addons/sale/report/order.rml +++ b/addons/sale/report/order.rml @@ -134,7 +134,7 @@ - [[ repeatIn(objects,'o') ]][[ setLang(o.partner_id.lang) ]] + [[ repeatIn(objects,'o') ]] [[ setLang(o.partner_id.lang) ]] @@ -169,15 +169,18 @@ Tel. : [[ o.partner_order_id.phone or removeParentNode('para') ]] Fax : [[ o.partner_order_id.fax or removeParentNode('para') ]] - VAT :[[ o.partner_id.vat or removeParentNode('para') ]] + TVA : [[ o.partner_id.vat or removeParentNode('para') ]] + + + - [[ o.state<>'draft' and removeParentNode('para') ]] Quotation N° : [[ o.name ]] - [[ o.state=='draft' and removeParentNode('para') ]] Order N° : [[ o.name ]] + [[ o.state<>'draft' and removeParentNode('para') ]] Quotation N° [[ o.name ]] + [[ o.state=='draft' and removeParentNode('para') ]] Order N° [[ o.name ]] From ccd168a55d0fe1f3a9262da0642d14573bc3b570 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Wed, 17 Sep 2008 18:27:57 +0530 Subject: [PATCH 18/36] Committed: third_party_ledger reports formated... account/report/third_party_ledger.py* account/report/third_party_ledger.rml* account/wizard/wizard_third_party_ledger.py* bzr revid: patelamit2003@gmail.com-20080917125757-5a1bzt9ymsthzwkc --- addons/account/report/third_party_ledger.py | 517 +++++++++++++----- addons/account/report/third_party_ledger.rml | 353 ++++++------ .../wizard/wizard_third_party_ledger.py | 160 ++++-- 3 files changed, 663 insertions(+), 367 deletions(-) mode change 100644 => 100755 addons/account/report/third_party_ledger.py mode change 100644 => 100755 addons/account/report/third_party_ledger.rml mode change 100644 => 100755 addons/account/wizard/wizard_third_party_ledger.py diff --git a/addons/account/report/third_party_ledger.py b/addons/account/report/third_party_ledger.py old mode 100644 new mode 100755 index bf060555e7e..fa1b73944cd --- a/addons/account/report/third_party_ledger.py +++ b/addons/account/report/third_party_ledger.py @@ -1,9 +1,6 @@ -# -*- encoding: utf-8 -*- ############################################################################## # -# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved. -# -# $Id$ +# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved. # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential @@ -30,153 +27,387 @@ import pooler import time +import re + +import datetime from report import report_sxw class third_party_ledger(report_sxw.rml_parse): - def __init__(self, cr, uid, name, context): - super(third_party_ledger, self).__init__(cr, uid, name, context) - self.localcontext.update( { - 'time': time, - 'lines': self.lines, - 'sum_debit_partner': self._sum_debit_partner, - 'sum_credit_partner': self._sum_credit_partner, - 'sum_debit': self._sum_debit, - 'sum_credit': self._sum_credit, - 'get_company': self._get_company, - 'get_currency': self._get_currency, - }) + def __init__(self, cr, uid, name, context): + self.date_lst = [] + self.date_lst_string = '' + super(third_party_ledger, self).__init__(cr, uid, name, context) + self.localcontext.update( { + 'time': time, + 'lines': self.lines, + 'sum_debit_partner': self._sum_debit_partner, + 'sum_credit_partner': self._sum_credit_partner, + 'sum_debit': self._sum_debit, + 'sum_credit': self._sum_credit, + 'get_company': self._get_company, + 'get_currency': self._get_currency, + 'comma_me' : self.comma_me, + }) + def date_range(self,start,end): + start = datetime.date.fromtimestamp(time.mktime(time.strptime(start,"%Y-%m-%d"))) + end = datetime.date.fromtimestamp(time.mktime(time.strptime(end,"%Y-%m-%d"))) + full_str_date = [] + # + r = (end+datetime.timedelta(days=1)-start).days + # + date_array = [start+datetime.timedelta(days=i) for i in range(r)] + for date in date_array: + full_str_date.append(str(date)) + return full_str_date + + # + def transform_period_into_date_array(self,data): + ## Get All Period Date + + if not data['form']['periods'][0][2] : + periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])]) + + else: + periods_id = data['form']['periods'][0][2] + + date_array = [] + for period_id in periods_id: + period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id) + date_array = date_array + self.date_range(period_obj.date_start,period_obj.date_stop) + + self.date_lst = date_array + print"self.date_lst[len(self.date_lst)-1]",self.date_lst[len(self.date_lst)-1] + self.date_lst.sort() + + + def transform_date_into_date_array(self,data): + + return_array = self.date_range(data['form']['date1'],data['form']['date2']) + self.date_lst = return_array + + self.date_lst.sort() - def preprocess(self, objects, data, ids): - account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') - line_query = account_move_line_obj._query_get(self.cr, self.uid, obj='line', - context={'fiscalyear': data['form']['fiscalyear'],'state':data['form']['state']}) - self.cr.execute( - "SELECT DISTINCT line.partner_id " \ - "FROM account_move_line AS line, account_account AS account " \ - "WHERE line.partner_id IS NOT NULL " \ - "AND line.date >= %s " \ - "AND line.date <= %s " \ - "AND " + line_query + " " \ - "AND line.account_id = account.id " \ - "AND account.company_id = %d " \ - "AND account.active", - (data['form']['date1'], data['form']['date2'], - data['form']['company_id'])) - new_ids = [id for (id,) in self.cr.fetchall()] - self.cr.execute( - "SELECT a.id " \ - "FROM account_account a " \ - "LEFT JOIN account_account_type t " \ - "ON (a.type=t.code) " \ - "WHERE t.partner_account=TRUE " \ - "AND a.company_id = %d " \ - "AND a.active", (data['form']['company_id'],)) - self.account_ids = ','.join([str(a) for (a,) in self.cr.fetchall()]) - self.partner_ids = ','.join(map(str, new_ids)) - objects = self.pool.get('res.partner').browse(self.cr, self.uid, new_ids) - super(third_party_ledger, self).preprocess(objects, data, new_ids) + def comma_me(self,amount): + if type(amount) is float : + amount = str('%.2f'%amount) + else : + amount = str(amount) + if (amount == '0'): + return ' ' + orig = amount + new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount) + + if orig == new: + return new + else: + return self.comma_me(new) + def special_map(self): + string_map = '' + for date_string in self.date_lst: + string_map = date_string + ',' + return string_map + + def preprocess(self, objects, data, ids): + print"====objects====",objects + for o in objects: + print o.id + PARTNER_REQUEST = '' + if (data['model'] == 'res.partner'): + print"data['model']",data['model'] + ## Si on imprime depuis les partenaires + if ids: + print"ids",ids + PARTNER_REQUEST = "AND line.partner_id IN (" + ','.join(map(str, ids)) + ")" + print"PARTNER_REQUEST",PARTNER_REQUEST + # Transformation des date + # + # + if data['form'].has_key('fiscalyear'): + self.transform_period_into_date_array(data) + else: + self.transform_date_into_date_array(data) + ## + self.date_lst_string = '\'' + '\',\''.join(map(str,self.date_lst)) + '\'' + # + #new_ids = [id for (id,) in self.cr.fetchall()] + if data['form']['result_selection'] == 'supplier': + ACCOUNT_TYPE = "AND a.type='payable' " + elif data['form']['result_selection'] == 'customer': + ACCOUNT_TYPE = "AND a.type='receivable' " + elif data['form']['result_selection'] == 'all': + ACCOUNT_TYPE = "AND (a.type='receivable' OR a.type='payable') " - def lines(self, partner): - account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') - line_query = account_move_line_obj._query_get(self.cr, self.uid, obj='l', - context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']}) - self.cr.execute( - "SELECT l.date, j.code, l.ref, l.name, l.debit, l.credit " \ - "FROM account_move_line l " \ - "LEFT JOIN account_journal j " \ - "ON (l.journal_id = j.id) " \ - "WHERE l.partner_id = %d " \ - "AND l.account_id IN (" + self.account_ids + ") " \ - "AND l.date >= %s " \ - "AND l.date <= %s " - "AND " + line_query + " " \ - "ORDER BY l.id", - (partner.id, self.datas['form']['date1'], self.datas['form']['date2'])) - res = self.cr.dictfetchall() - sum = 0.0 - for r in res: - sum += r['debit'] - r['credit'] - r['progress'] = sum - return res + self.cr.execute( + "SELECT a.id " \ + "FROM account_account a " \ + "LEFT JOIN account_account_type t " \ + "ON (a.type=t.code) " \ + "WHERE t.partner_account=TRUE " \ + "AND a.company_id = %d " \ + " " + ACCOUNT_TYPE + " " \ + "AND a.active", (data['form']['company_id'],)) + self.account_ids = ','.join([str(a) for (a,) in self.cr.fetchall()]) - def _sum_debit_partner(self, partner): - account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') - line_query = account_move_line_obj._query_get(self.cr, self.uid, - obj='account_move_line', - context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']}) - self.cr.execute( - "SELECT sum(debit) " \ - "FROM account_move_line " \ - "WHERE partner_id = %d " \ - "AND account_id IN (" + self.account_ids + ") " \ - "AND date >= %s " \ - "AND date <= %s " \ - "AND " + line_query, - (partner.id, self.datas['form']['date1'], self.datas['form']['date2'])) - return self.cr.fetchone()[0] or 0.0 - - def _sum_credit_partner(self, partner): - account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') - line_query = account_move_line_obj._query_get(self.cr, self.uid, - obj='account_move_line', - context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']}) - self.cr.execute( - "SELECT sum(credit) " \ - "FROM account_move_line " \ - "WHERE partner_id=%d " \ - "AND account_id IN (" + self.account_ids + ") " \ - "AND date >= %s " \ - "AND date <= %s " \ - "AND " + line_query, - (partner.id, self.datas["form"]["date1"], self.datas["form"]["date2"])) - return self.cr.fetchone()[0] or 0.0 - - def _sum_debit(self): - if not self.ids: - return 0.0 - account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') - line_query = account_move_line_obj._query_get(self.cr, self.uid, - obj='account_move_line', - context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']}) - self.cr.execute( - "SELECT sum(debit) " \ - "FROM account_move_line " \ - "WHERE partner_id IN (" + self.partner_ids + ") " \ - "AND account_id IN (" + self.account_ids + ") " \ - "AND date >= %s " \ - "AND date <= %s " \ - "AND " + line_query, - (self.datas['form']['date1'], self.datas['form']['date2'])) - return self.cr.fetchone()[0] or 0.0 - - def _sum_credit(self): - if not self.ids: - return 0.0 - account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') - line_query = account_move_line_obj._query_get(self.cr, self.uid, - obj='account_move_line', - context={'fiscalyear': self.datas['form']['fiscalyear'],'state':self.datas['form']['state']}) - self.cr.execute( - "SELECT sum(credit) " \ - "FROM account_move_line " \ - "WHERE partner_id IN (" + self.partner_ids + ") " \ - "AND account_id IN (" + self.account_ids + ") " \ - "AND date >= %s " \ - "AND date <= %s " \ - "AND " + line_query, - (self.datas['form']['date1'], self.datas['form']['date2'])) - return self.cr.fetchone()[0] or 0.0 + account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') + partner_to_use = [] + print"self.account_ids",self.account_ids + + if data['form']['soldeinit'] : + self.cr.execute( + "SELECT DISTINCT line.partner_id " \ + "FROM account_move_line AS line, account_account AS account " \ + "WHERE line.partner_id IS NOT NULL " \ + "AND line.account_id = account.id " \ + "AND line.date < %s " \ + "AND line.reconcile_id IS NULL " \ +# "AND line.account_id IN (" + self.account_ids + ") " \ + " " + PARTNER_REQUEST + " " \ + "AND account.company_id = %d " \ + "AND account.active " , + (self.date_lst[len(self.date_lst)-1],data['form']['company_id'])) + else: + self.cr.execute( + "SELECT DISTINCT line.partner_id " \ + "FROM account_move_line AS line, account_account AS account " \ + "WHERE line.partner_id IS NOT NULL " \ + "AND line.account_id = account.id " \ + "AND line.date IN (" + self.date_lst_string + ") " \ +# "AND line.account_id IN (" + self.account_ids + ") " \ + " " + PARTNER_REQUEST + " " \ + "AND account.company_id = %d " \ + "AND account.active " , + (data['form']['company_id'])) + res = self.cr.dictfetchall() + print"===res===",res + for res_line in res: + partner_to_use.append(res_line['partner_id']) + print"====partner_to_use====",partner_to_use + res = self.cr.dictfetchall() + + for res_line in res: + partner_to_use.append(res_line['partner_id']) + print"====partner_to_use====",partner_to_use - def _get_company(self, form): - return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).name - def _get_currency(self, form): - return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).currency_id.name + new_ids = partner_to_use + print"new_ids",new_ids + self.partner_ids = ','.join(map(str, new_ids)) + objects = self.pool.get('res.partner').browse(self.cr, self.uid, new_ids) + print"objects",objects + super(third_party_ledger, self).preprocess(objects, data, new_ids) + def lines(self, partner,data): + print"====partner====",partner + account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') + full_account = [] + if data['form']['reconcil'] : + RECONCILE_TAG = " " + else: + RECONCILE_TAG = "AND l.reconcile_id IS NULL" + if data['form']['soldeinit'] : + self.cr.execute( + "SELECT l.id,l.date,j.code, l.ref, l.name, l.debit, l.credit " \ + "FROM account_move_line l " \ + "LEFT JOIN account_journal j " \ + "ON (l.journal_id = j.id) " \ + "WHERE l.partner_id = %d " \ + "AND l.account_id IN (" + self.account_ids + ") " \ + "AND l.date < %s " \ + "AND l.reconcile_id IS NULL " + "ORDER BY l.id", + (partner.id, self.date_lst[0])) + res = self.cr.dictfetchall() + sum = 0.0 + for r in res: + sum = r['debit'] - r['credit'] + r['progress'] = sum + full_account.append(r) + + self.cr.execute( + "SELECT l.id,l.date,j.code, l.ref, l.name, l.debit, l.credit " \ + "FROM account_move_line l " \ + "LEFT JOIN account_journal j " \ + "ON (l.journal_id = j.id) " \ + "WHERE l.partner_id = %d " \ + "AND l.account_id IN (" + self.account_ids + ") " \ + "AND l.date IN (" + self.date_lst_string + ") " \ + " " + RECONCILE_TAG + " "\ + "ORDER BY l.id", + (partner.id,)) + res = self.cr.dictfetchall() + sum = 0.0 + for r in res: + sum = r['debit'] - r['credit'] + r['progress'] = sum + full_account.append(r) + + return full_account + + def _sum_debit_partner(self, partner,data): + account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') + result_tmp = 0.0 + if data['form']['reconcil'] : + RECONCILE_TAG = " " + else: + RECONCILE_TAG = "AND reconcile_id IS NULL" + if data['form']['soldeinit'] : + self.cr.execute( + "SELECT sum(debit) " \ + "FROM account_move_line " \ + "WHERE partner_id = %d " \ + "AND account_id IN (" + self.account_ids + ") " \ + "AND reconcile_id IS NULL " \ + "AND date < %s " , + (partner.id, self.date_lst[0],)) + contemp = self.cr.fetchone() + if contemp != None: + result_tmp = contemp[0] or 0.0 + else: + result_tmp = result_tmp + 0.0 + + + self.cr.execute( + "SELECT sum(debit) " \ + "FROM account_move_line " \ + "WHERE partner_id = %d " \ + "AND account_id IN (" + self.account_ids + ") " \ + " " + RECONCILE_TAG + " " \ + "AND date IN (" + self.date_lst_string + ") " , + (partner.id,)) + + contemp = self.cr.fetchone() + if contemp != None: + result_tmp = contemp[0] or 0.0 + else: + result_tmp = result_tmp + 0.0 + return result_tmp + + def _sum_credit_partner(self, partner,data): + account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') + result_tmp = 0.0 + if data['form']['reconcil'] : + RECONCILE_TAG = " " + else: + RECONCILE_TAG = "AND reconcile_id IS NULL" + if data['form']['soldeinit'] : + self.cr.execute( + "SELECT sum(credit) " \ + "FROM account_move_line " \ + "WHERE partner_id=%d " \ + "AND account_id IN (" + self.account_ids + ") " \ + "AND reconcile_id IS NULL " \ + "AND date < %s " , + (partner.id,self.date_lst[0],)) + contemp = self.cr.fetchone() + if contemp != None: + result_tmp = contemp[0] or 0.0 + else: + result_tmp = result_tmp + 0.0 + + self.cr.execute( + "SELECT sum(credit) " \ + "FROM account_move_line " \ + "WHERE partner_id=%d " \ + "AND account_id IN (" + self.account_ids + ") " \ + " " + RECONCILE_TAG + " " \ + "AND date IN (" + self.date_lst_string + ") " , + (partner.id,)) + + contemp = self.cr.fetchone() + if contemp != None: + result_tmp = contemp[0] or 0.0 + else: + result_tmp = result_tmp + 0.0 + return result_tmp + + def _sum_debit(self,data): + if not self.ids: + return 0.0 + account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') + result_tmp = 0.0 + if data['form']['reconcil'] : + RECONCILE_TAG = " " + else: + RECONCILE_TAG = "AND reconcile_id IS NULL" + if data['form']['soldeinit'] : + self.cr.execute( + "SELECT sum(debit) " \ + "FROM account_move_line " \ + "WHERE partner_id IN (" + self.partner_ids + ") " \ + "AND account_id IN (" + self.account_ids + ") " \ + "AND reconcile_id IS NULL " \ + "AND date < %s " , + (self.date_lst[0],)) + contemp = self.cr.fetchone() + if contemp != None: + result_tmp = contemp[0] or 0.0 + else: + result_tmp = result_tmp + 0.0 + + self.cr.execute( + "SELECT sum(debit) " \ + "FROM account_move_line " \ + "WHERE partner_id IN (" + self.partner_ids + ") " \ + "AND account_id IN (" + self.account_ids + ") " \ + " " + RECONCILE_TAG + " " \ + "AND date IN (" + self.date_lst_string + ") " + ) + + contemp = self.cr.fetchone() + if contemp != None: + result_tmp = contemp[0] or 0.0 + else: + result_tmp = result_tmp + 0.0 + + return result_tmp + + + def _sum_credit(self,data): + if not self.ids: + return 0.0 + account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') + result_tmp = 0.0 + if data['form']['reconcil'] : + RECONCILE_TAG = " " + else: + RECONCILE_TAG = "AND reconcile_id IS NULL" + if data['form']['soldeinit'] : + self.cr.execute( + "SELECT sum(credit) " \ + "FROM account_move_line " \ + "WHERE partner_id IN (" + self.partner_ids + ") " \ + "AND account_id IN (" + self.account_ids + ") " \ + "AND reconcile_id IS NULL " \ + "AND date < %s " , + (self.date_lst[0],)) + contemp = self.cr.fetchone() + if contemp != None: + result_tmp = contemp[0] or 0.0 + else: + result_tmp = result_tmp + 0.0 + self.cr.execute( + "SELECT sum(credit) " \ + "FROM account_move_line " \ + "WHERE partner_id IN (" + self.partner_ids + ") " \ + "AND account_id IN (" + self.account_ids + ") " \ + " " + RECONCILE_TAG + " " \ + "AND date IN (" + self.date_lst_string + ") " + ) + contemp = self.cr.fetchone() + if contemp != None: + result_tmp = contemp[0] or 0.0 + else: + result_tmp = result_tmp + 0.0 + + return result_tmp + + def _get_company(self, form): + return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).name + + def _get_currency(self, form): + return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).currency_id.name + report_sxw.report_sxw('report.account.third_party_ledger', 'res.partner', - 'addons/account/report/third_party_ledger.rml',parser=third_party_ledger, - header=False) - - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + 'addons/account/third_party_ledger.rml',parser=third_party_ledger, + header=2) diff --git a/addons/account/report/third_party_ledger.rml b/addons/account/report/third_party_ledger.rml old mode 100644 new mode 100755 index a44bbb4f2ca..2f7d0bf82e9 --- a/addons/account/report/third_party_ledger.rml +++ b/addons/account/report/third_party_ledger.rml @@ -3,6 +3,34 @@ @@ -13,227 +41,188 @@ - - - - - - + + + + + + - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + Third Party Ledger + + + + + [[ data['form']['page_split'] == True or removeParentNode('para') ]] + [[ repeatIn(objects, 'p') ]] + + + + + Date + + + JNRL + + + Ref. + + + Entry label + + + Debit + + + Credit + + + Balance + + + + + + + - - - + Balance brought forward - Third party ledger + [[ (sum_debit(data)) ]] - From [[ formatLang(data['form']['date1'], date=True) ]] - to [[ formatLang(data['form']['date2'], date=True) ]] - - - - - [[ get_company(data['form']) ]] + [[ (sum_credit(data)) ]] - Complete - - - Currency: [[ get_currency(data['form']) ]] + [[ (sum_debit(data) - sum_credit(data)) ]] - - - - Printing date: [[ formatLang(time.strftime('%Y-%m-%d'), date=True) ]] at [[ time.strftime('%H:%M:%S') ]] - - - - - - - Date - - - J. code - - - Voucher Nb - - - Entry label - - - Debit - - - Credit - - - Progressive balance - - - - - - -
- [[ repeatIn(objects, 'p') ]] - [[ p.ref ]] [[ p.name ]] - + + + + [[ repeatIn(objects, 'p') ]] + + + - [[ repeatIn(lines(p), 'line') ]][[ formatLang(line['date'], date=True) ]] + [[ p.ref ]] - [[ p.name ]] + + + + + + + [[ (sum_debit_partner(p,data)) ]] - [[ line['code'] ]] + [[ (sum_credit_partner(p,data)) ]] - [[ line['ref'] ]] - - - [[ line['name'] ]] - - - [[ formatLang(line['debit']) ]] - - - [[ formatLang(line['credit']) ]] - - - [[ formatLang(line['progress']) ]] + [[ (sum_debit_partner(p,data) - sum_credit_partner(p,data)) ]] - - - - Total for [[ p.ref ]] - - - - - - [[ formatLang(sum_debit_partner(p)) ]] - - - [[ formatLang(sum_credit_partner(p)) ]] - - - [[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] - - - - - - -
- - - - - - - Balance brought forward - - - [[ formatLang(sum_debit()) ]] - - - [[ formatLang(sum_credit()) ]] - - - [[ formatLang((sum_debit() - sum_credit())) ]] - - - - - - + + + + + + [[ repeatIn(lines(p,data), 'line') ]][[ line['date'] ]] + + + [[ line['code'] ]] + + + [[ line['ref'] ]] + + + [[ line['name'] ]] + + + [[ (line['debit']) or '' ]] + + + [[ (line['credit']) or '' ]] + + + [[ (line['progress']) or '' ]] + + + + + + + +
- diff --git a/addons/account/wizard/wizard_third_party_ledger.py b/addons/account/wizard/wizard_third_party_ledger.py old mode 100644 new mode 100755 index 2c64c8f1df2..e9f2daf4b01 --- a/addons/account/wizard/wizard_third_party_ledger.py +++ b/addons/account/wizard/wizard_third_party_ledger.py @@ -1,9 +1,6 @@ -# -*- encoding: utf-8 -*- ############################################################################## # -# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved. -# -# $Id$ +# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved. # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential @@ -32,54 +29,133 @@ import time import wizard import pooler + +report_type = ''' +
+
''' + + dates_form = '''
- - -
[[ data['form']['page_split'] == True or removeParentNode('para') ]] - [[ repeatIn(objects, 'p') ]] + [[ repeatIn(objects, 'p') ]] [[ setLang(p.partner_id.lang) ]] @@ -169,7 +169,7 @@ - [[ repeatIn(objects, 'p') ]] + [[ repeatIn(objects, 'p') ]] From 9988b2fda62e643780db4d690d5c1735b86132bd Mon Sep 17 00:00:00 2001 From: Vinay Rana Date: Fri, 19 Sep 2008 10:55:40 +0530 Subject: [PATCH 20/36] modify account balance wizard add two new wizard for extra inputs bzr revid: vinusoft85@gmail.com-20080919052540-yjlua8k9jj8lcxfq --- .../wizard/wizard_account_balance_report.py | 109 +++++++++++++++--- 1 file changed, 92 insertions(+), 17 deletions(-) diff --git a/addons/account/wizard/wizard_account_balance_report.py b/addons/account/wizard/wizard_account_balance_report.py index 90eeaf44256..f038ce2bd68 100644 --- a/addons/account/wizard/wizard_account_balance_report.py +++ b/addons/account/wizard/wizard_account_balance_report.py @@ -1,9 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved. -# -# $Id$ +# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved. # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential @@ -30,37 +28,117 @@ import wizard import pooler +import time + +report_type = ''' +
+
''' + dates_form = '''
- -