From 0ec541f6f46f52eb700ade3dd03c98f34277bbfc Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Wed, 9 Mar 2011 11:30:25 +0530 Subject: [PATCH] [IMP] : mrp: string formatting bzr revid: rha@tinyerp.com-20110309060025-7klq1juri4ho2f1z --- addons/mrp/report/price.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 85063c1a335..393797e43cb 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -147,12 +147,14 @@ class report_custom(report_rml): - """ xml += """ - """ + _('Total Cost of ') + str(number) +' '+ product.uom_id.name + """: + Total Cost of %d %s: - """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ - """+ rml_obj.formatLang(total, digits=purchase_price_digits) +' '+ company_currency.symbol + """ - '""" + %s %s + %s %s + '""" %(number, product.uom_id.name, rml_obj.formatLang(total_strd, digits=purchase_price_digits), + company_currency.symbol, rml_obj.formatLang(total, digits=purchase_price_digits),company_currency.symbol) + else: bom = bom_pool.browse(cr, uid, bom_id, context=context) factor = number * product.uom_id.factor / bom.product_uom.factor @@ -191,19 +193,22 @@ class report_custom(report_rml): xml += workcenter_header xml += "" + xml_tmp + '' xml += """ - """ + _('Work Cost of ') + str(number) +' '+ product.uom_id.name +""": + Work Cost of %d "%s: - """+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ company_currency.symbol +""" - '""" + %s %s + '""" %(number, product.uom_id.name, rml_obj.formatLang(total2, digits=purchase_price_digits), + company_currency.symbol) + xml += """ - """ + _('Total Cost of ') + str(number) +' '+ product.uom_id.name + """: + Total Cost of %d %s: - """+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """ + %s %s - '""" + '""" %(number, product.uom_id.name, rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits), + company_currency.symbol) xml = '' + config_start + config_stop + xml + ''