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