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 += """