diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py
index 5ca53a2d95c..fc32eeeed9e 100644
--- a/addons/mrp/report/price.py
+++ b/addons/mrp/report/price.py
@@ -41,6 +41,7 @@ class report_custom(report_rml):
rml_obj=report_sxw.rml_parse(cr, uid, product_pool._name,context)
rml_obj.localcontext.update({'lang':context.get('lang',False)})
company_currency = user_pool.browse(cr, uid, uid).company_id.currency_id
+ company_currency_symbol = company_currency.symbol or company_currency.name
def process_bom(bom, currency_id, factor=1):
xml = ''
sum = 0
@@ -62,7 +63,7 @@ class report_custom(report_rml):
'uom': prod.uom_po_id.id,
'date': time.strftime('%Y-%m-%d'),
})[pricelist.id]
- main_sp_price = """"""+rml_obj.formatLang(price)+' '+ (company_currency.symbol or company_currency.name)+"""\r\n"""
+ main_sp_price = """"""+rml_obj.formatLang(price)+' '+ (company_currency_symbol)+"""\r\n"""
sum += prod_qtty*price
std_price = product_uom_pool._compute_price(cr, uid, prod.uom_id.id, prod.standard_price, to_uom_id=product_uom.id)
main_strd_price = str(std_price) + '\r\n'
@@ -75,11 +76,11 @@ class report_custom(report_rml):
'uom': prod.uom_po_id.id,
'date': time.strftime('%Y-%m-%d'),
})[pricelist.id]
- sellers_price += """"""+rml_obj.formatLang(price) +' '+ (company_currency.symbol or company_currency.name) +"""\r\n"""
+ sellers_price += """"""+rml_obj.formatLang(price) +' '+ (company_currency_symbol) +"""\r\n"""
xml += """ """+ prod_name +"""
"""+ main_sp_name + sellers + """
"""+ rml_obj.formatLang(prod_qtty) +' '+ product_uom_name +"""
- """+ rml_obj.formatLang(float(main_strd_price)) +' '+ (company_currency.symbol or company_currency.name) +"""
+ """+ rml_obj.formatLang(float(main_strd_price)) +' '+ (company_currency_symbol) +"""
""" + main_sp_price + sellers_price + """'"""
xml += '
'
@@ -93,9 +94,9 @@ class report_custom(report_rml):
xml = ''
xml += "" + to_xml(workcenter.name) + ''
xml += ""
- xml += """"""+rml_obj.formatLang(cost_cycle)+' '+ (company_currency.symbol or company_currency.name) + """"""
- xml += """"""+rml_obj.formatLang(cost_hour)+' '+ (company_currency.symbol or company_currency.name) + """"""
- xml += """"""+rml_obj.formatLang(cost_hour + cost_cycle)+' '+ (company_currency.symbol or company_currency.name) + """"""
+ xml += """"""+rml_obj.formatLang(cost_cycle)+' '+ (company_currency_symbol) + """"""
+ xml += """"""+rml_obj.formatLang(cost_hour)+' '+ (company_currency_symbol) + """"""
+ xml += """"""+rml_obj.formatLang(cost_hour + cost_cycle)+' '+ (company_currency_symbol) + """"""
xml += '
'
return xml, total
@@ -159,8 +160,8 @@ class report_custom(report_rml):
""" + _('Total Cost of %s %s') % (str(number), product_uom_name) + """:
- """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ (company_currency.symbol or company_currency.name) + """
- """+ rml_obj.formatLang(total, digits=purchase_price_digits) +' '+ (company_currency.symbol or company_currency.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)
@@ -186,7 +187,7 @@ class report_custom(report_rml):
""" + _('Components Cost of %s %s') % (str(number), product_uom_name) + """:
- """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ (company_currency.symbol or company_currency.name) + """
+ """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ (company_currency_symbol) + """
'"""
@@ -204,13 +205,13 @@ class report_custom(report_rml):
- """+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ (company_currency.symbol or company_currency.name) +"""
+ """+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ (company_currency_symbol) +"""
'"""
xml += """
""" + _('Total Cost of %s %s') % (str(number), product_uom_name) + """:
- """+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ (company_currency.symbol or company_currency.name) + """
+ """+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ (company_currency_symbol) + """
'"""