From 2d83c96317f0609a2fe04e211f54bb0cb6f42a7a Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Wed, 31 Aug 2011 18:30:50 +0530 Subject: [PATCH 01/10] [FIX]:Product cost structure report xml predefined entities problem lp bug: https://launchpad.net/bugs/834004 fixed bzr revid: ksa@tinyerp.com-20110831130050-uvonk98nbe437sd7 --- addons/mrp/report/price.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 733312ba799..e28250a2531 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -26,7 +26,7 @@ from tools import to_xml from report import report_sxw from datetime import datetime from tools.translate import _ - +import tools #FIXME: we should use toxml class report_custom(report_rml): @@ -48,14 +48,14 @@ class report_custom(report_rml): sum_strd = 0 prod = product_pool.browse(cr, uid, bom['product_id']) - prod_name = bom['name'] + prod_name = to_xml(tools.ustr(bom['name'])) prod_qtty = factor * bom['product_qty'] product_uom = product_uom_pool.browse(cr, uid, bom['product_uom'], context=context) main_sp_price, main_sp_name , main_strd_price = '','','' sellers, sellers_price = '','' if prod.seller_id: - main_sp_name = "%s\r\n" %(prod.seller_id.name) + main_sp_name = "%s\r\n" % to_xml(tools.ustr(prod.seller_id.name)) price = supplier_info_pool.price_get(cr, uid, prod.seller_id.id, prod.id, number*prod_qtty)[prod.seller_id.id] price = product_uom_pool._compute_price(cr, uid, prod.uom_id.id, price, to_uom_id=product_uom.id) main_sp_price = """"""+rml_obj.formatLang(price)+' '+ company_currency.symbol+"""\r\n""" @@ -64,12 +64,12 @@ class report_custom(report_rml): main_strd_price = str(std_price) + '\r\n' sum_strd = prod_qtty*std_price for seller_id in prod.seller_ids: - sellers += '- '+ seller_id.name.name +'\r\n' + sellers += '- '+ to_xml(tools.ustr(seller_id.name.name)) +'\r\n' price = supplier_info_pool.price_get(cr, uid, seller_id.name.id, prod.id, number*prod_qtty)[seller_id.name.id] price = product_uom_pool._compute_price(cr, uid, prod.uom_id.id, price, to_uom_id=product_uom.id) sellers_price += """"""+rml_obj.formatLang(price) +' '+ company_currency.symbol +"""\r\n""" - xml += """ """+ prod_name +""" - """+ main_sp_name + sellers + """ + xml += """ """+ to_xml(tools.ustr(prod_name)) +""" + """+ to_xml(tools.ustr(main_sp_name)) + to_xml(tools.ustr(sellers)) + """ """+ rml_obj.formatLang(prod_qtty) +' '+ product_uom.name +""" """+ rml_obj.formatLang(float(main_strd_price)) +' '+ company_currency.symbol +""" """ + main_sp_price + sellers_price + """'""" @@ -134,7 +134,7 @@ class report_custom(report_rml): for product in product_pool.browse(cr, uid, ids, context=context): bom_id = bom_pool._bom_find(cr, uid, product.id, product.uom_id.id) title = "%s" %(_("Cost Structure")) - title += "%s" %product.name + title += "%s" %to_xml(tools.ustr(product.name)) xml += "" + title + prod_header + "" if not bom_id: total_strd = number * product.standard_price From 9f4c7536b57d4fc7dabc805aeac1a3d7e550e102 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Fri, 2 Sep 2011 13:03:11 +0530 Subject: [PATCH 02/10] [IMP]: for header right xml code bzr revid: ksa@tinyerp.com-20110902073311-6d0vf8e21cl0cmed --- addons/mrp/report/price.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index e28250a2531..c3d7b05658b 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -134,7 +134,7 @@ class report_custom(report_rml): for product in product_pool.browse(cr, uid, ids, context=context): bom_id = bom_pool._bom_find(cr, uid, product.id, product.uom_id.id) title = "%s" %(_("Cost Structure")) - title += "%s" %to_xml(tools.ustr(product.name)) + title += "%s" % (to_xml(tools.ustr(product.name))).replace('&', '&') xml += "" + title + prod_header + "" if not bom_id: total_strd = number * product.standard_price From 5b7cfd8c5e84d47fae314275343e196a273f83b2 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Mon, 5 Sep 2011 11:52:50 +0530 Subject: [PATCH 03/10] [IMP]: for uom xml predefined entity problems bzr revid: ksa@tinyerp.com-20110905062250-9ao1jytl9zbp5c5j --- addons/mrp/report/price.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index c3d7b05658b..28899b70be0 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -70,7 +70,7 @@ class report_custom(report_rml): sellers_price += """"""+rml_obj.formatLang(price) +' '+ company_currency.symbol +"""\r\n""" xml += """ """+ to_xml(tools.ustr(prod_name)) +""" """+ to_xml(tools.ustr(main_sp_name)) + to_xml(tools.ustr(sellers)) + """ - """+ rml_obj.formatLang(prod_qtty) +' '+ product_uom.name +""" + """+ rml_obj.formatLang(prod_qtty) +' '+ to_xml(tools.ustr(product_uom.name)).replace('&', '&') +""" """+ rml_obj.formatLang(float(main_strd_price)) +' '+ company_currency.symbol +""" """ + main_sp_price + sellers_price + """'""" @@ -147,7 +147,7 @@ class report_custom(report_rml): - """ xml += """ - """ + _('Total Cost of %s %s') % (str(number), product.uom_id.name) + """: + """ + _('Total Cost of %s %s') % (str(number), to_xml(tools.ustr(product.uom_id.name)).replace('&', '&')) + """: """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ @@ -174,7 +174,7 @@ class report_custom(report_rml): xml += "" + xml_tmp + '' xml += """ - """ + _('Components Cost of %s %s') % (str(number), product.uom_id.name) + """: + """ + _('Components Cost of %s %s') % (str(number), to_xml(tools.ustr(product.uom_id.name)).replace('&', '&')) + """: """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ @@ -191,14 +191,14 @@ class report_custom(report_rml): xml += workcenter_header xml += "" + xml_tmp + '' xml += """ - """ + _('Work Cost of %s %s') % (str(number), product.uom_id.name) +""": + """ + _('Work Cost of %s %s') % (str(number), to_xml(tools.ustr(product.uom_id.name)).replace('&', '&')) +""": """+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ company_currency.symbol +""" '""" xml += """ - """ + _('Total Cost of %s %s') % (str(number), product.uom_id.name) + """: + """ + _('Total Cost of %s %s') % (str(number), to_xml(tools.ustr(product.uom_id.name)).replace('&', '&')) + """: """+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """ From b7a245726e0a0ac97dbd968b201c4331bb7dd9f9 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Mon, 5 Sep 2011 14:27:14 +0530 Subject: [PATCH 04/10] [IMP]:xml predefined entity for workcenter name bzr revid: ksa@tinyerp.com-20110905085714-000jnoffavrrgvvw --- addons/mrp/report/price.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 28899b70be0..1cf56ec3732 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -83,7 +83,7 @@ class report_custom(report_rml): cost_hour = wrk['hour']*workcenter.costs_hour total = cost_cycle + cost_hour xml = '' - xml += "" + workcenter.name + '' + xml += "" + to_xml(tools.ustr(workcenter.name)) + '' xml += "" xml += """"""+rml_obj.formatLang(cost_cycle)+' '+ company_currency.symbol + """""" xml += """"""+rml_obj.formatLang(cost_hour)+' '+ company_currency.symbol + """""" From a225afcb9fd7cb36dac48c6a9bceacdaa2db79ab Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Mon, 5 Sep 2011 15:08:44 +0530 Subject: [PATCH 05/10] [IMP]:for workcenter name bzr revid: ksa@tinyerp.com-20110905093844-56zkvoqs2oio6li5 --- addons/mrp/report/price.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 1cf56ec3732..1e087855f2b 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -83,7 +83,7 @@ class report_custom(report_rml): cost_hour = wrk['hour']*workcenter.costs_hour total = cost_cycle + cost_hour xml = '' - xml += "" + to_xml(tools.ustr(workcenter.name)) + '' + xml += "" + to_xml(tools.ustr(workcenter.name)).replace('&', '&') + '' xml += "" xml += """"""+rml_obj.formatLang(cost_cycle)+' '+ company_currency.symbol + """""" xml += """"""+rml_obj.formatLang(cost_hour)+' '+ company_currency.symbol + """""" From d7f017cde66da87e6412d444834c079d109c3a31 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Wed, 19 Oct 2011 17:45:49 +0530 Subject: [PATCH 06/10] [IMP]: remove replace and improve the report bzr revid: ksa@tinyerp.com-20111019121549-q0yedbw2fdiihcpg --- addons/mrp/report/price.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 0c470d5b0aa..6758f7bed14 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -50,14 +50,15 @@ class report_custom(report_rml): sum_strd = 0 prod = product_pool.browse(cr, uid, bom['product_id']) - prod_name = to_xml(tools.ustr(bom['name'])) + prod_name = to_xml(bom['name']) prod_qtty = factor * bom['product_qty'] product_uom = product_uom_pool.browse(cr, uid, bom['product_uom'], context=context) + uom_id = to_xml(product_uom.name) main_sp_price, main_sp_name , main_strd_price = '','','' sellers, sellers_price = '','' if prod.seller_id: - main_sp_name = "%s\r\n" %(prod.seller_id.name) + main_sp_name = "%s\r\n" %to_xml(prod.seller_id.name) pricelist = prod.seller_id.property_product_pricelist_purchase price = pricelist_pool.price_get(cr,uid,[pricelist.id], prod.id, number*prod_qtty or 1.0, prod.seller_id.id, { @@ -70,7 +71,7 @@ class report_custom(report_rml): main_strd_price = str(std_price) + '\r\n' sum_strd = prod_qtty*std_price for seller_id in prod.seller_ids: - sellers += '- '+ seller_id.name.name +'\r\n' + sellers += '- '+ to_xml(seller_id.name.name) +'\r\n' pricelist = seller_id.name.property_product_pricelist_purchase price = pricelist_pool.price_get(cr,uid,[pricelist.id], prod.id, number*prod_qtty or 1.0, seller_id.name.id, { @@ -78,9 +79,9 @@ class report_custom(report_rml): 'date': time.strftime('%Y-%m-%d'), })[pricelist.id] sellers_price += """"""+rml_obj.formatLang(price) +' '+ company_currency.symbol +"""\r\n""" - xml += """ """+ to_xml(tools.ustr(prod_name)) +""" - """+ to_xml(tools.ustr(main_sp_name)) + to_xml(tools.ustr(sellers)) + """ - """+ rml_obj.formatLang(prod_qtty) +' '+ to_xml(tools.ustr(product_uom.name)).replace('&', '&') +""" + xml += """ """+ to_xml(prod_name) +""" + """+ to_xml(main_sp_name) + to_xml(sellers) + """ + """+ rml_obj.formatLang(prod_qtty) +' '+ to_xml(uom_id) +""" """+ rml_obj.formatLang(float(main_strd_price)) +' '+ company_currency.symbol +""" """ + main_sp_price + sellers_price + """'""" @@ -89,11 +90,12 @@ class report_custom(report_rml): def process_workcenter(wrk): workcenter = workcenter_pool.browse(cr, uid, wrk['workcenter_id']) + workcenter_name = to_xml(workcenter.name) cost_cycle = wrk['cycle']*workcenter.costs_cycle cost_hour = wrk['hour']*workcenter.costs_hour total = cost_cycle + cost_hour xml = '' - xml += "" + to_xml(tools.ustr(workcenter.name)).replace('&', '&') + '' + xml += "" + to_xml(workcenter_name) + '' xml += "" xml += """"""+rml_obj.formatLang(cost_cycle)+' '+ company_currency.symbol + """""" xml += """"""+rml_obj.formatLang(cost_hour)+' '+ company_currency.symbol + """""" @@ -142,9 +144,11 @@ class report_custom(report_rml): purchase_price_digits = rml_obj.get_digits(dp='Purchase Price') for product in product_pool.browse(cr, uid, ids, context=context): + product_name = to_xml(product.name) + uom_id = to_xml(product.uom_id.name) bom_id = bom_pool._bom_find(cr, uid, product.id, product.uom_id.id) title = "%s" %(_("Cost Structure")) - title += "%s" % (to_xml(tools.ustr(product.name))).replace('&', '&') + title += "%s" % (to_xml(product_name)) xml += "" + title + prod_header + "" if not bom_id: total_strd = number * product.standard_price @@ -157,7 +161,7 @@ class report_custom(report_rml): - """ xml += """ - """ + _('Total Cost of %s %s') % (str(number), to_xml(tools.ustr(product.uom_id.name)).replace('&', '&')) + """: + """ + _('Total Cost of %s %s') % (str(number), to_xml(uom_id)) + """: """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ @@ -184,7 +188,7 @@ class report_custom(report_rml): xml += "" + xml_tmp + '' xml += """ - """ + _('Components Cost of %s %s') % (str(number), to_xml(tools.ustr(product.uom_id.name)).replace('&', '&')) + """: + """ + _('Components Cost of %s %s') % (str(number), to_xml(uom_id)) + """: """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ @@ -201,14 +205,14 @@ class report_custom(report_rml): xml += workcenter_header xml += "" + xml_tmp + '' xml += """ - """ + _('Work Cost of %s %s') % (str(number), to_xml(tools.ustr(product.uom_id.name)).replace('&', '&')) +""": + """ + _('Work Cost of %s %s') % (str(number), to_xml(uom_id)) +""": """+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ company_currency.symbol +""" '""" xml += """ - """ + _('Total Cost of %s %s') % (str(number), to_xml(tools.ustr(product.uom_id.name)).replace('&', '&')) + """: + """ + _('Total Cost of %s %s') % (str(number), to_xml(uom_id)) + """: """+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """ From 85c4dfd0992456e559aa6e7271635875cfb3b8f1 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Wed, 19 Oct 2011 17:53:07 +0530 Subject: [PATCH 07/10] [REM]:unuse line bzr revid: ksa@tinyerp.com-20111019122307-mzuauhjl5s4hvdpd --- addons/mrp/report/price.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 6758f7bed14..183d3e1a7f5 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -27,7 +27,6 @@ from tools import to_xml from report import report_sxw from datetime import datetime from tools.translate import _ -import tools #FIXME: we should use toxml class report_custom(report_rml): From ec0ae3f62ab6695243d8cb2ba74f93f5d8426b9c Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Thu, 3 Nov 2011 18:26:48 +0530 Subject: [PATCH 08/10] [IMP]:improve the report bzr revid: ksa@tinyerp.com-20111103125648-cqjs8nzq8ekoicsk --- addons/mrp/report/price.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 183d3e1a7f5..47d6554f801 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -22,7 +22,6 @@ import time import pooler from report.interface import report_rml -#from report.interface import toxml from tools import to_xml from report import report_sxw from datetime import datetime @@ -57,7 +56,7 @@ class report_custom(report_rml): sellers, sellers_price = '','' if prod.seller_id: - main_sp_name = "%s\r\n" %to_xml(prod.seller_id.name) + main_sp_name = '- '+ to_xml(prod.seller_id.name) +'\r\n' pricelist = prod.seller_id.property_product_pricelist_purchase price = pricelist_pool.price_get(cr,uid,[pricelist.id], prod.id, number*prod_qtty or 1.0, prod.seller_id.id, { @@ -78,9 +77,9 @@ class report_custom(report_rml): 'date': time.strftime('%Y-%m-%d'), })[pricelist.id] sellers_price += """"""+rml_obj.formatLang(price) +' '+ company_currency.symbol +"""\r\n""" - xml += """ """+ to_xml(prod_name) +""" - """+ to_xml(main_sp_name) + to_xml(sellers) + """ - """+ rml_obj.formatLang(prod_qtty) +' '+ to_xml(uom_id) +""" + xml += """ """+ prod_name +""" + """+ main_sp_name + sellers + """ + """+ rml_obj.formatLang(prod_qtty) +' '+ uom_id +""" """+ rml_obj.formatLang(float(main_strd_price)) +' '+ company_currency.symbol +""" """ + main_sp_price + sellers_price + """'""" @@ -89,12 +88,11 @@ class report_custom(report_rml): def process_workcenter(wrk): workcenter = workcenter_pool.browse(cr, uid, wrk['workcenter_id']) - workcenter_name = to_xml(workcenter.name) cost_cycle = wrk['cycle']*workcenter.costs_cycle cost_hour = wrk['hour']*workcenter.costs_hour total = cost_cycle + cost_hour xml = '' - xml += "" + to_xml(workcenter_name) + '' + xml += "" + to_xml(workcenter.name) + '' xml += "" xml += """"""+rml_obj.formatLang(cost_cycle)+' '+ company_currency.symbol + """""" xml += """"""+rml_obj.formatLang(cost_hour)+' '+ company_currency.symbol + """""" @@ -143,11 +141,10 @@ class report_custom(report_rml): purchase_price_digits = rml_obj.get_digits(dp='Purchase Price') for product in product_pool.browse(cr, uid, ids, context=context): - product_name = to_xml(product.name) uom_id = to_xml(product.uom_id.name) bom_id = bom_pool._bom_find(cr, uid, product.id, product.uom_id.id) title = "%s" %(_("Cost Structure")) - title += "%s" % (to_xml(product_name)) + title += "%s" % (to_xml(product.name)) xml += "" + title + prod_header + "" if not bom_id: total_strd = number * product.standard_price @@ -160,7 +157,7 @@ class report_custom(report_rml): - """ xml += """ - """ + _('Total Cost of %s %s') % (str(number), to_xml(uom_id)) + """: + """ + _('Total Cost of %s %s') % (str(number), uom_id) + """: """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ @@ -187,7 +184,7 @@ class report_custom(report_rml): xml += "" + xml_tmp + '' xml += """ - """ + _('Components Cost of %s %s') % (str(number), to_xml(uom_id)) + """: + """ + _('Components Cost of %s %s') % (str(number), uom_id) + """: """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ @@ -204,14 +201,14 @@ class report_custom(report_rml): xml += workcenter_header xml += "" + xml_tmp + '' xml += """ - """ + _('Work Cost of %s %s') % (str(number), to_xml(uom_id)) +""": + """ + _('Work Cost of %s %s') % (str(number), uom_id) +""": """+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ company_currency.symbol +""" '""" xml += """ - """ + _('Total Cost of %s %s') % (str(number), to_xml(uom_id)) + """: + """ + _('Total Cost of %s %s') % (str(number), uom_id) + """: """+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """ From cdbbae8c6c554464ea956c8f1dd24da30284a8b4 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Thu, 3 Nov 2011 18:33:55 +0530 Subject: [PATCH 09/10] [IMP]:variable name bzr revid: ksa@tinyerp.com-20111103130355-tw26yki5shg2wy0s --- addons/mrp/report/price.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 47d6554f801..edaa2d02ef9 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -51,7 +51,7 @@ class report_custom(report_rml): prod_name = to_xml(bom['name']) prod_qtty = factor * bom['product_qty'] product_uom = product_uom_pool.browse(cr, uid, bom['product_uom'], context=context) - uom_id = to_xml(product_uom.name) + product_uom_name = to_xml(product_uom.name) main_sp_price, main_sp_name , main_strd_price = '','','' sellers, sellers_price = '','' @@ -79,7 +79,7 @@ class report_custom(report_rml): sellers_price += """"""+rml_obj.formatLang(price) +' '+ company_currency.symbol +"""\r\n""" xml += """ """+ prod_name +""" """+ main_sp_name + sellers + """ - """+ rml_obj.formatLang(prod_qtty) +' '+ uom_id +""" + """+ rml_obj.formatLang(prod_qtty) +' '+ product_uom_name +""" """+ rml_obj.formatLang(float(main_strd_price)) +' '+ company_currency.symbol +""" """ + main_sp_price + sellers_price + """'""" @@ -141,7 +141,7 @@ class report_custom(report_rml): purchase_price_digits = rml_obj.get_digits(dp='Purchase Price') for product in product_pool.browse(cr, uid, ids, context=context): - uom_id = to_xml(product.uom_id.name) + product_uom_name = to_xml(product.uom_id.name) bom_id = bom_pool._bom_find(cr, uid, product.id, product.uom_id.id) title = "%s" %(_("Cost Structure")) title += "%s" % (to_xml(product.name)) @@ -157,7 +157,7 @@ class report_custom(report_rml): - """ xml += """ - """ + _('Total Cost of %s %s') % (str(number), uom_id) + """: + """ + _('Total Cost of %s %s') % (str(number), product_uom_name) + """: """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ @@ -184,7 +184,7 @@ class report_custom(report_rml): xml += "" + xml_tmp + '' xml += """ - """ + _('Components Cost of %s %s') % (str(number), uom_id) + """: + """ + _('Components Cost of %s %s') % (str(number), product_uom_name) + """: """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ @@ -201,14 +201,14 @@ class report_custom(report_rml): xml += workcenter_header xml += "" + xml_tmp + '' xml += """ - """ + _('Work Cost of %s %s') % (str(number), uom_id) +""": + """ + _('Work Cost of %s %s') % (str(number), product_uom_name) +""": """+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ company_currency.symbol +""" '""" xml += """ - """ + _('Total Cost of %s %s') % (str(number), uom_id) + """: + """ + _('Total Cost of %s %s') % (str(number), product_uom_name) + """: """+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """ From ab5349f24f90705768d34a969b42930a0593ca3e Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Thu, 3 Nov 2011 18:57:44 +0530 Subject: [PATCH 10/10] [REM]:unuse line bzr revid: ksa@tinyerp.com-20111103132744-qj1u3j2bhafhtbco --- addons/mrp/report/price.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index edaa2d02ef9..a12c580e378 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -27,7 +27,6 @@ from report import report_sxw from datetime import datetime from tools.translate import _ -#FIXME: we should use toxml class report_custom(report_rml): def create_xml(self, cr, uid, ids, datas, context=None): number = (datas.get('form', False) and datas['form']['number']) or 1