From d03c2d037850ef7c3241079ca34eef47dbea5014 Mon Sep 17 00:00:00 2001 From: ced <> Date: Tue, 16 Jan 2007 08:37:23 +0000 Subject: [PATCH] Small fix for formatting in reports bzr revid: ced-0001a45f72114238e5ec8abd8eab679f32180c7c --- addons/account/report/invoice.rml | 21 ++++++++++++--------- addons/purchase/report/order.rml | 2 +- addons/report_crm/report_crm.py | 4 ++-- addons/sale/report/order.rml | 2 +- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml index b0003baef5f..fd7330e194b 100644 --- a/addons/account/report/invoice.rml +++ b/addons/account/report/invoice.rml @@ -36,6 +36,9 @@ + + + @@ -105,9 +108,9 @@ - Tél. : [[ o.address_invoice_id.phone or '' ]] + Tel. : [[ o.address_invoice_id.phone or '' ]] Fax : [[ o.address_invoice_id.fax or '' ]] - TVA : [[ o.partner_id.vat or '' ]] + VAT : [[ o.partner_id.vat or '' ]] @@ -152,10 +155,10 @@ Unit Price - Disc. + Disc. (%) - Net Price + Price @@ -170,13 +173,13 @@ [[ ', '.join([lt.name for lt in l.invoice_line_tax_id]) ]] - [[ l.quantity ]] [[l.uos_id and l.uos_id.name or '' ]] + [[ '%.2f' % l.quantity ]] [[l.uos_id and l.uos_id.name or '' ]] [[ '%.2f' % l.price_unit ]] - [[ '%.3f' % (l.discount or 0.0) ]] + [[ '%.2f' % (l.discount or 0.0) ]] [[ '%.2f' %l.price_subtotal ]] [[o.currency_id.code ]] @@ -229,7 +232,7 @@ - Subtotal : + Total (excl. taxes): [[ '%.2f' % o.amount_untaxed ]] [[o.currency_id.code ]] @@ -237,7 +240,7 @@ - Taxes : + Taxes: [[ '%.2f' % o.amount_tax ]] [[o.currency_id.code ]] @@ -245,7 +248,7 @@ - Total : + Total (incl. taxes): [[ '%.2f' % o.amount_total ]] [[o.currency_id.code ]] diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml index 4e716efce4c..eaac95e1aae 100644 --- a/addons/purchase/report/order.rml +++ b/addons/purchase/report/order.rml @@ -196,7 +196,7 @@ [[ time.strftime('%d/%m/%Y', time.strptime( line.date_planned, '%Y-%m-%d')) ]] - [[ line.product_qty ]] [[ line.product_uom.name ]] + [[ '%.2f' % line.product_qty ]] [[ line.product_uom.name ]] [[ '%.2f' % line.price_unit ]] diff --git a/addons/report_crm/report_crm.py b/addons/report_crm/report_crm.py index bb7f164b168..4c7f81b6bf4 100644 --- a/addons/report_crm/report_crm.py +++ b/addons/report_crm/report_crm.py @@ -68,7 +68,7 @@ class report_crm_case_user(osv.osv): sum(planned_cost) as amount_costs, sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob, avg(probability)::decimal(16,2) as probability, - to_char(avg(date_closed-c.create_date), 'DD"d" HH12:MI:SS') as delay_close + to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close from crm_case c group by substring(c.create_date for 7), c.state, c.user_id, c.section_id @@ -106,7 +106,7 @@ class report_crm_case_categ(osv.osv): sum(planned_cost) as amount_costs, sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob, avg(probability)::decimal(16,2) as probability, - to_char(avg(date_closed-c.create_date), 'DD"d" HH12:MI:SS') as delay_close + to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close from crm_case c group by substring(c.create_date for 7), c.state, c.categ_id, c.section_id diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml index 7e33c8dad6e..68b6c284d82 100644 --- a/addons/sale/report/order.rml +++ b/addons/sale/report/order.rml @@ -169,7 +169,7 @@ [[ ', '.join(map(lambda x: x.name, line.tax_id))]] - [[ line.product_uos_qty or line.product_uom_qty ]] [[ line.product_uos and line.product_uos.name or line.product_uom.name ]] + [[ '%.2f' % line.product_uos_qty or '%.2f' % line.product_uom_qty ]] [[ line.product_uos and line.product_uos.name or line.product_uom.name ]] [[ (line.discount and str(line.discount)+'%')or '' ]]