From f40cce6f5d1672419b3a307dec3d024ad4d06643 Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 9 Aug 2007 06:06:15 +0000 Subject: [PATCH] sale_category: use the format function for sale_category report bzr revid: ced-e6eb38c9b7ea8f93844074b2dc5df879057183fc --- .../report/sale_category_report.rml | 279 +----------------- 1 file changed, 1 insertion(+), 278 deletions(-) diff --git a/addons/sale_category/report/sale_category_report.rml b/addons/sale_category/report/sale_category_report.rml index 65e7c8bf6b7..4d11439ae4c 100644 --- a/addons/sale_category/report/sale_category_report.rml +++ b/addons/sale_category/report/sale_category_report.rml @@ -1,280 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ 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_shipping_id.street ]] - [[ o.partner_shipping_id.street2 or '' ]] - [[ o.partner_shipping_id.zip or '' ]] [[ o.partner_shipping_id.city 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_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 '' ]] [[ ', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '') ]] - - - - - - - - [[ 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 '' ]] - - - - Tél. : [[ o.partner_order_id.phone or removeParentNode('para') ]] - Fax : [[ o.partner_order_id.fax or removeParentNode('para') ]] - TVA : [[ o.partner_id.vat or removeParentNode('para') ]] - - - - - - - [[ o.state=='draft' and 'Quotation ' or 'Order ' ]] N° : [[ o.name ]] - - - - Your order reference : [[ o.client_order_ref or '' ]] - Date ordered : [[ time.strftime('%d/%m/%Y', time.strptime(o.date_order, '%Y-%m-%d')) ]] - Our salesman : [[ o.user_id.name ]] - [[ o.topnotes or '' ]] - - - - Product Description - - - Applicable Taxes - - - Scheduled Date - - - Qty - - - Disc. - - - Unit Price - - - Net Price - - - -
- [[repeatIn(order_lines_by_categ(o), 'cat')]] - [[cat[0][1] ]] -
- [[ repeatIn(cat[1],'line') ]] - - - - [[ line.name ]] - - - [[ ', '.join(map(lambda x: x.name, line.tax_id))]] - - - [[ time.strftime('%d/%m/%Y', time.strptime( line.date_planned, '%Y-%m-%d')) ]] - - - [[ line.product_uom_qty ]] [[ line.product_uom.name ]] - - - [[ (line.discount and str(line.discount)+'%')or '' ]] - - - [[ '%.2f' % line.price_unit ]] - - - [[ '%.2f' % line.price_subtotal ]] - - - - - - -
- - - - [[ repeatIn((line.notes and [line.notes]) or [], 'l') ]] - - - [[ l ]] [[ setTag('para','xpre') ]] - - - - - - - - -
- - - - - - - - - Net Total : - - - [[ '%.2f' % o.amount_untaxed ]] [[ o.pricelist_id.currency_id.name ]] - - - - - - - - - - Taxes : - - - [[ '%.2f' % o.amount_tax ]] [[ o.pricelist_id.currency_id.name ]] - - - - - - - - - - TOTAL : - - - [[ '%.2f' % o.amount_total ]] [[ o.pricelist_id.currency_id.name ]] - - - - - - - - - - - - - [[ o.note or '' ]] [[ setTag('para','xpre') ]] - - - - - [[ 'xpre' and o.partner_id.property_payment_term and o.partner_id.property_payment_term[1] ]] [[ setTag('para','xpre') ]] - - - - - - -
-
+[[ 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_shipping_id.street ]][[ o.partner_shipping_id.street2 or '' ]][[ o.partner_shipping_id.zip or '' ]] [[ o.partner_shipping_id.city 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_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 '' ]] [[ ', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '') ]] [[ 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 '' ]] Tél. : [[ o.partner_order_id.phone or removeParentNode('para') ]]Fax : [[ o.partner_order_id.fax or removeParentNode('para') ]]TVA : [[ o.partner_id.vat or removeParentNode('para') ]] [[ o.state=='draft' and 'Quotation ' or 'Order ' ]] N° : [[ o.name ]] Your order reference : [[ o.client_order_ref or '' ]]Date ordered : [[ time.strftime('%d/%m/%Y', time.strptime(o.date_order, '%Y-%m-%d')) ]]Our salesman : [[ o.user_id.name ]][[ o.topnotes or '' ]] Product DescriptionApplicable TaxesDate PromisedQtyDisc.Unit PriceNet Price
[[repeatIn(order_lines_by_categ(o), 'cat')]][[cat[0][1] ]]
[[ repeatIn(cat[1],'line') ]][[ line.name ]][[ ', '.join(map(lambda x: x.name, line.tax_id))]][[ time.strftime('%d/%m/%Y', time.strptime( line.date_planned, '%Y-%m-%d')) ]][[ line.product_uom_qty ]] [[ line.product_uom.name ]][[ (line.discount and str(line.discount)+'%')or '' ]][[ '%.2f' % line.price_unit ]][[ '%.2f' % line.price_subtotal ]]
[[ repeatIn((line.notes and [line.notes]) or [], 'l') ]][[ l ]] [[ setTag('para','xpre') ]]
Net Total :[[ '%.2f' % o.amount_untaxed ]] [[ o.pricelist_id.currency_id.name ]] Taxes :[[ '%.2f' % o.amount_tax ]] [[ o.pricelist_id.currency_id.name ]] TOTAL :[[ '%.2f' % o.amount_total ]] [[ o.pricelist_id.currency_id.name ]] [[ format(o.note or '') ]][[ format((o.partner_id.property_payment_term and o.partner_id.property_payment_term[1]) or '') ]]