diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py index 3a6ab81a308..52bcf3bcd4a 100644 --- a/addons/mrp/report/price.py +++ b/addons/mrp/report/price.py @@ -131,6 +131,8 @@ class report_custom(report_rml): """ % (_('Component'), _('Component suppliers'), _('Quantity'),_('Cost Price per Uom')+'('+company_currency.code+')', _('Supplier Price per Uom')+'('+company_currency.code+')') + purchase_price_digits = rml_obj.get_digits(dp='Purchase Price') + 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")) @@ -150,8 +152,8 @@ class report_custom(report_rml): """ + _('Total Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'('+company_currency.code+')'+ """: - """+ rml_obj.formatLang(total_strd) +' '+ company_currency.symbol + """ - """+ rml_obj.formatLang(total) +' '+ company_currency.symbol + """ + """+ 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) @@ -177,8 +179,8 @@ class report_custom(report_rml): """ + _('Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'(' + company_currency.code +')'+ """: - """+ rml_obj.formatLang(total_strd) +' '+ company_currency.symbol + """ - """+ rml_obj.formatLang(total) +' '+ company_currency.symbol + """ + """+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """ + """+ rml_obj.formatLang(total, digits=purchase_price_digits) +' '+ company_currency.symbol + """ '""" total2 = 0 @@ -195,14 +197,14 @@ class report_custom(report_rml): - """+ rml_obj.formatLang(total2) +' '+ company_currency.symbol +""" + """+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ company_currency.symbol +""" '""" xml += """ """ + _('Total Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'('+company_currency.code+')'+ """: - """+ rml_obj.formatLang(total_strd+total2) +' '+ company_currency.symbol + """ - """+ rml_obj.formatLang(total+total2) +' '+ company_currency.symbol + """ + """+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """ + """+ rml_obj.formatLang(total+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """ '""" xml = '' + config_start + config_stop + xml + ''