From 0ea45b05266ec0d8a1b4c7315e6a9e08f75527d5 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Sat, 22 Nov 2008 14:32:57 +0530 Subject: [PATCH 1/3] Sale Order report prob solved-vir bzr revid: patelamit2003@gmail.com-20081122090257-k1abdy0zaluikfti --- addons/sale/report/order.rml | 57 ++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml index 54a0dc6c527..f87a9585123 100644 --- a/addons/sale/report/order.rml +++ b/addons/sale/report/order.rml @@ -134,24 +134,23 @@ - [[ repeatIn(objects,'o') ]] - [[ setLang(o.partner_id.lang) ]] + [[ repeatIn(objects,'o') ]][[ setLang(o.partner_id.lang) ]] Shipping address : - [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]] - [[ o.partner_shipping_id.title or '' ]] [[ o.partner_shipping_id.name ]] + [[ o.partner_id.title or '' ]][[ o.partner_id.name ]] + [[ o.partner_shipping_id.title or '' ]][[ o.partner_shipping_id.name ]] [[ o.partner_shipping_id.street ]] - [[ o.partner_shipping_id.street2 or '' ]] - [[ o.partner_shipping_id.city or '' ]] [[ o.partner_shipping_id.zip or '' ]] - [[ o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name or '' ]] [[ o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name or '' ]] + [[ o.partner_shipping_id.street2 or '' ]] + [[ o.partner_shipping_id.city or '' ]][[ o.partner_shipping_id.zip or '' ]] + [[ o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name or '' ]][[ o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name or '' ]] - Invoice address :[[ o.partner_id.property_payment_term and o.partner_id.property_payment_term.name or '' ]] - [[ o.partner_invoice_id.street ]] [[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]] - [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]] + Invoice address :[[ o.partner_id.property_payment_term.name ]] + [[ o.partner_invoice_id.street ]][[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]] + [[ o.partner_invoice_id.zip or '' ]][[ o.partner_invoice_id.city or '' ]][[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]] @@ -159,17 +158,17 @@ - [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]] - [[ o.partner_order_id.title or '' ]] [[ o.partner_order_id.name ]] + [[ o.partner_id.title or '' ]][[ o.partner_id.name ]] + [[ o.partner_order_id.title or '' ]][[ o.partner_order_id.name ]] [[ o.partner_order_id.street ]] [[ o.partner_order_id.street2 or '' ]] - [[ o.partner_order_id.zip or '' ]] [[ o.partner_order_id.city or '' ]] - [[ o.partner_order_id.state_id and o.partner_order_id.state_id.name or '' ]] [[ o.partner_order_id.country_id and o.partner_order_id.country_id.name or '' ]] + [[ o.partner_order_id.zip or '' ]][[ o.partner_order_id.city or '' ]] + [[ o.partner_order_id.state_id and o.partner_order_id.state_id.name or '' ]][[ o.partner_order_id.country_id and o.partner_order_id.country_id.name or '' ]] Tel. : [[ o.partner_order_id.phone or removeParentNode('para') ]] - Fax : [[ o.partner_order_id.fax or removeParentNode('para') ]] + Fax : [[ o.partner_order_id.fax or removeParentNode('para') ]] TVA : [[ o.partner_id.vat or removeParentNode('para') ]] @@ -191,7 +190,7 @@ Your Reference - Date + Date Ordered Our Salesman @@ -204,7 +203,7 @@ - [[ o.client_order_ref or '' ]] + [[ o.name ]] [[ o.date_order ]] @@ -213,7 +212,7 @@ [[ o.user_id.name ]] - [[ o.partner_id.property_payment_term['name'] or o.payment_term and o.payment_term.name or '' ]] + [[ o.partner_id and o.partner_id.property_payment_term and o.partner_id.property_payment_term['name'] or '' ]] @@ -244,28 +243,28 @@
[[ repeatIn(o.order_line,'line') ]] - + [[ line.name ]] - [[ ', '.join(map(lambda x: x.name, line.tax_id)) ]] + [[ ', '.join(map(lambda x: x.name, line.tax_id)) or '0.00' ]] - [[ line.product_uos and line.product_uos_qty or line.product_uom_qty ]] + [[ line.product_uos and line.product_uos_qty or line.product_uom_qty or '0.00']] [[ line.product_uos and line.product_uos.name or line.product_uom.name ]] - [[ line.price_unit ]] + [[ line.price_unit or '0.00' ]] - [[ line.discount and str(line.discount) or '' ]] + [[ line.discount and str(line.discount) or '0.00' ]] - [[ line.price_subtotal ]] + [[ line.price_subtotal or '0.00' ]] @@ -316,7 +315,7 @@ Net Total : - [[ o.amount_untaxed ]] + [[ o.amount_untaxed or '0.00' ]] [[ o.pricelist_id.currency_id.name ]] @@ -332,7 +331,7 @@ Taxes : - [[ o.amount_tax ]] + [[ o.amount_tax or '0.00' ]] [[ o.pricelist_id.currency_id.name ]] @@ -348,7 +347,7 @@ Total : - [[ o.amount_total ]] + [[ o.amount_total or '0.00' ]] [[ o.pricelist_id.currency_id.name ]] @@ -358,7 +357,7 @@ - + [[ format(o.note or '') ]] @@ -374,4 +373,4 @@ - + \ No newline at end of file From a4a7ab9e828f1e053cab9a0dfafd565aff8a59b5 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Sat, 22 Nov 2008 14:38:54 +0530 Subject: [PATCH 2/3] Invoice Report prob solved bzr revid: patelamit2003@gmail.com-20081122090854-gg1xd0m1270w9b69 --- addons/account/report/invoice.rml | 81 +++++++++++++++++-------------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml index 08423ce8538..6247ca00818 100644 --- a/addons/account/report/invoice.rml +++ b/addons/account/report/invoice.rml @@ -195,6 +195,7 @@ + @@ -203,7 +204,7 @@ - + @@ -241,29 +242,29 @@ - [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]] - [[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]] + [[ o.partner_id.title or '' ]][[ o.partner_id.name ]] + [[ o.address_invoice_id.title or '' ]][[ o.address_invoice_id.name ]] [[ o.address_invoice_id.street ]] [[ o.address_invoice_id.street2 or '' ]] - [[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]] + [[ o.address_invoice_id.zip or '' ]][[ o.address_invoice_id.city or '' ]] [[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]] [[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]] - Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]] + Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]] Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]] VAT : [[ o.partner_id.vat or removeParentNode('para') ]] - Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]] + Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]][[ o.number ]] PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma') or removeParentNode('para')) and '' ]] - PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]] + PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]] Canceled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] - Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]] - Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]] - Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]] + Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]][[ o.number ]] + Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]][[ o.number ]] + Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]][[ o.number ]] @@ -276,7 +277,7 @@ Invoice Date - Partner Code + Partner Ref. @@ -289,7 +290,7 @@ [[ o.date_invoice ]] - [[ o.address_invoice_id.partner_id.ref or '' ]] + [[ o.address_invoice_id.partner_id.ref or '' ]] @@ -314,7 +315,7 @@ Disc. (%) - Price + Price @@ -326,22 +327,22 @@ [[ l.name ]] - [[ ', '.join([lt.name for lt in l.invoice_line_tax_id]) ]] + [[ ', '.join([lt.name for lt in l.invoice_line_tax_id]) or '0.00' ]] - [[ formatLang(l.quantity) ]] + [[ formatLang(l.quantity) or '0.00' ]] [[ (l.uos_id and l.uos_id.name) or '' ]] - [[ formatLang(l.price_unit) ]] + [[ formatLang(l.price_unit) or '0.00' ]] - [[ l.discount and formatLang (l.discount) or '' ]] + [[ l.discount and formatLang (l.discount) or '0.00' ]] - [[ formatLang(l.price_subtotal) ]] + [[ formatLang(l.price_subtotal) or '0.00' ]] [[ o.currency_id.code ]] @@ -349,7 +350,10 @@ - [[ format(l.note or removeParentNode('tr')) ]] + [[ format(l.note or removeParentNode('tr')) ]] + + + @@ -389,10 +393,10 @@
- + - + @@ -408,13 +412,13 @@ - + - Net Total: + Net Total: - [[ formatLang(o.amount_untaxed) ]] + [[ formatLang(o.amount_untaxed) or '0.00' ]] [[ o.currency_id.code ]] @@ -424,13 +428,13 @@ - + - Taxes: + Taxes: - [[ formatLang(o.amount_tax) ]] + [[ formatLang(o.amount_tax) or '0.00']] [[ o.currency_id.code ]] @@ -440,13 +444,13 @@ - + - Total: + Total: - [[ formatLang(o.amount_total) ]] + [[ formatLang(o.amount_total) or '0.00' ]] [[ o.currency_id.code ]] @@ -459,20 +463,23 @@ - [[ format(o.amount_tax or removeParentNode('blockTable')) ]] + [[ format(o.amount_tax or removeParentNode('blockTable')) ]] - Tax + Tax - Base + Base - Amount + Amount + + + @@ -487,7 +494,7 @@ [[ formatLang(t.base) ]] - [[ formatLang(t.amount) or 0.00 ]] + [[ formatLang(t.amount) or 0.00 ]] @@ -534,7 +541,7 @@ - [[ format(o.comment or removeParentNode('blockTable')) ]] + [[ format(o.comment or removeParentNode('blockTable')) ]] @@ -544,7 +551,7 @@ - [[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]] + [[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]] From ee1dd19f8702ab4028690d6a077fec722b513f23 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Fri, 21 Nov 2008 14:51:07 +0530 Subject: [PATCH 3/3] fix setlang error bzr revid: patelamit2003@gmail.com-20081121092107-lypv6rm49a8e995l --- addons/sale/report/order.rml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml index f87a9585123..30ce25b4952 100644 --- a/addons/sale/report/order.rml +++ b/addons/sale/report/order.rml @@ -134,7 +134,8 @@ - [[ repeatIn(objects,'o') ]][[ setLang(o.partner_id.lang) ]] + [[ repeatIn(objects,'o') ]] + [[ setLang(o.partner_id.lang) ]]