diff --git a/addons/account/report/account_print_invoice.rml b/addons/account/report/account_print_invoice.rml index b4492e05b0d..0bab362e578 100644 --- a/addons/account/report/account_print_invoice.rml +++ b/addons/account/report/account_print_invoice.rml @@ -260,10 +260,10 @@ [[ formatLang(l.price_unit) ]] - [[ formatLang(l.discount, digits=get_digits(dp='Account')) ]] + [[ formatLang(l.discount, dp='Account') ]] - [[ formatLang(l.price_subtotal, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(l.price_subtotal, dp='Account') ]] [[ o.currency_id.symbol ]] @@ -322,7 +322,7 @@ Taxes: - [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_tax, dp='Account') ]] [[ o.currency_id.symbol ]] @@ -368,7 +368,7 @@ [[ t.name ]] - [[ formatLang(t.base, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(t.base, dp='Account') ]] [[ o.currency_id.symbol ]] [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] diff --git a/addons/account_budget/report/crossovered_budget_report.rml b/addons/account_budget/report/crossovered_budget_report.rml index ef45c1bd2a6..63db53ab5ce 100644 --- a/addons/account_budget/report/crossovered_budget_report.rml +++ b/addons/account_budget/report/crossovered_budget_report.rml @@ -163,13 +163,13 @@ [['.....' *(a['status']-1) ]][[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ a['name'] ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], dp='Account') ]] [[ company.currency_id.symbol ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], dp='Account') ]] [[ company.currency_id.symbol ]] - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] + [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], dp='Account') ]] [[ company.currency_id.symbol ]] [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc'],digits=2) ]]% @@ -183,13 +183,13 @@ [[ repeatIn(funct_total(data['form']),'b') ]] Total : - [[ formatLang(b['tot_theo'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] + [[ formatLang(b['tot_theo'], dp='Account') ]] [[ company.currency_id.symbol ]] - [[ formatLang(b['tot_pln'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] + [[ formatLang(b['tot_pln'], dp='Account') ]] [[ company.currency_id.symbol ]] - [[ formatLang(b['tot_prac'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] + [[ formatLang(b['tot_prac'], dp='Account') ]] [[ company.currency_id.symbol ]] [[ formatLang(b['tot_perc'],digits=2) ]]% @@ -200,4 +200,4 @@ - \ No newline at end of file + diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml index dd802503430..4e6bdfd0aa0 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml @@ -403,7 +403,7 @@ Net Total: - [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_untaxed, dp='Account') ]] [[ o.currency_id.symbol ]] @@ -418,7 +418,7 @@ Taxes: - [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_tax, dp='Account') ]] [[ o.currency_id.symbol ]] @@ -433,7 +433,7 @@ Total: - [[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_total, dp='Account') ]] [[ o.currency_id.symbol ]] @@ -469,10 +469,10 @@ [[ t.name ]] - [[ formatLang(t.base, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(t.base, dp='Account') ]] [[ o.currency_id.symbol ]] - [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, dp='Account') ]] [[ o.currency_id.symbol ]] diff --git a/addons/account_invoice_layout/report/special_message_invoice.rml b/addons/account_invoice_layout/report/special_message_invoice.rml index b9cdafee0bf..eabb8efe9c2 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.rml +++ b/addons/account_invoice_layout/report/special_message_invoice.rml @@ -407,7 +407,7 @@ Net Total : - [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_untaxed, dp='Account') ]] [[ o.currency_id.symbol ]] @@ -422,7 +422,7 @@ Taxes : - [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_tax, dp='Account') ]] [[ o.currency_id.symbol ]] @@ -437,7 +437,7 @@ Total : - [[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_total, dp='Account') ]] [[ o.currency_id.symbol ]] @@ -473,10 +473,10 @@ [[ t.name ]] - [[ formatLang(t.base, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(t.base, dp='Account') ]] [[ o.currency_id.symbol ]] - [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, dp='Account') ]] [[ o.currency_id.symbol ]] diff --git a/addons/hr_expense/report/hr_expense_report.py b/addons/hr_expense/report/hr_expense_report.py index b50e37b654e..df630931875 100644 --- a/addons/hr_expense/report/hr_expense_report.py +++ b/addons/hr_expense/report/hr_expense_report.py @@ -21,6 +21,7 @@ import tools from osv import fields,osv +from decimal_precision import decimal_precision as dp class hr_expense_report(osv.osv): @@ -47,11 +48,11 @@ class hr_expense_report(osv.osv): 'company_id':fields.many2one('res.company', 'Company', readonly=True), 'user_id':fields.many2one('res.users', 'Validation User', readonly=True), 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True), - 'price_total':fields.float('Total Price', readonly=True), + 'price_total':fields.float('Total Price', readonly=True, digits_compute=dp.get_precision('Account')), 'delay_valid':fields.float('Delay to Valid', readonly=True), 'delay_confirm':fields.float('Delay to Confirm', readonly=True), 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True), - 'price_average':fields.float('Average Price', readonly=True), + 'price_average':fields.float('Average Price', readonly=True, digits_compute=dp.get_precision('Account')), 'nbr':fields.integer('# of Lines', readonly=True), 'no_of_products':fields.integer('# of Products', readonly=True), 'no_of_account':fields.integer('# of Accounts', readonly=True), diff --git a/addons/hr_payroll/report/payroll_register.rml b/addons/hr_payroll/report/payroll_register.rml index e47a7bfd870..4dd2900171a 100644 --- a/addons/hr_payroll/report/payroll_register.rml +++ b/addons/hr_payroll/report/payroll_register.rml @@ -175,22 +175,22 @@ [[ l.employee_id.name ]] - [[ formatLang(l.basic) ]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[ formatLang(l.basic, dp='Account') ]] [[ company.currency_id.symbol]] - [[ formatLang(l.other_pay)]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[ formatLang(l.other_pay, dp='Account')]] [[ company.currency_id.symbol]] - [[ formatLang(l.allounce)]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[ formatLang(l.allounce, dp='Account')]] [[ company.currency_id.symbol]] - [[ formatLang(l.grows)]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[ formatLang(l.grows, dp='Account')]] [[ company.currency_id.symbol]] - [[ formatLang(l.deduction)]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[ formatLang(l.deduction, dp='Account')]] [[ company.currency_id.symbol]] - [[ formatLang(l.net)]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[ formatLang(l.net, dp='Account')]] [[ company.currency_id.symbol]] @@ -206,22 +206,22 @@ Total Salary - [[formatLang(get_basic(o))]][[ (company.currency_id and company.currency_id.symbol) or '']] + [[formatLang(get_basic(), dp='Account')]][[ company.currency_id.symbol]] - [[formatLang(get_other(o))]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[formatLang(get_other(), dp='Account')]] [[ company.currency_id.symbol]] - [[formatLang(get_allow(o))]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[formatLang(get_allow(), dp='Account')]] [[ company.currency_id.symbol]] - [[formatLang(get_grows(o))]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[formatLang(get_grows(), dp='Account')]] [[ company.currency_id.symbol]] - [[formatLang(get_deduct(o))]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[formatLang(get_deduct(), dp='Account')]] [[ company.currency_id.symbol]] - [[formatLang(get_net(o))]] [[ (company.currency_id and company.currency_id.symbol) or '']] + [[formatLang(get_net(), dp='Account')]] [[ company.currency_id.symbol]] @@ -259,4 +259,4 @@ - \ No newline at end of file + diff --git a/addons/hr_payroll/report/payslip.rml b/addons/hr_payroll/report/payslip.rml index 1e4e13e3026..26c59391234 100644 --- a/addons/hr_payroll/report/payslip.rml +++ b/addons/hr_payroll/report/payslip.rml @@ -392,19 +392,19 @@ Basic Salary - [[ formatLang(o.basic_before_leaves) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]] + [[ formatLang(o.basic_before_leaves, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] Leaved Deduction - [[ o.leaves or '' ]] + [[ formatLang(o.leaves, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] Basic Salary – Leaves - [[ formatLang(o.basic) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]] + [[ formatLang(o.basic, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] @@ -433,7 +433,7 @@ [[ ld.code ]] - [[ formatLang(ld.total) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]] + [[ formatLang(ld.total, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] @@ -463,7 +463,7 @@ Basic Salary - [[ formatLang(o.basic) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]] + [[ formatLang(o.basic, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] @@ -471,7 +471,7 @@ [[repeatIn(get_earnings(o.line_ids),'a') ]] [[ a.code ]] - [[ formatLang(a.total) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]] + [[ formatLang(a.total, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] @@ -488,7 +488,7 @@ [[ b.code ]] - [[ formatLang(b.total) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]] + [[ formatLang(b.total, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] @@ -508,13 +508,13 @@ Total Earnings([[ o.company_id and o.company_id.currency_id.symbol or '' ]]) - [[ formatLang(o.allounce + o.basic) ]] [[ o.company_id and o.company_id.currency_id.symbol ]] + [[ formatLang(o.allounce + o.basic, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] Total Deductions([[ o.company_id and o.company_id.currency_id.symbol or '' ]]) - [[ formatLang(o.deduction) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]] + [[ formatLang(o.deduction, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] @@ -542,10 +542,10 @@ [[ ol.code or '' ]] - [[ ol.type in ['advance','loan','otherpay'] and formatLang(ol.total) or '' ]] [[ ol.type in ['advance','loan','otherpay'] and o.company_id and o.company_id.currency_id.symbol or '' ]] + [[ ol.type in ['advance','loan','otherpay'] and formatLang(ol.total, dp='Account') or '' ]] [[ ol.type in ['advance','loan','otherpay'] and o.company_id and o.company_id.currency_id.symbol or '' ]] - [[ ol.type in ['otherdeduct','installment'] and formatLang(ol.total) or '' ]] [[ ol.type in ['otherdeduct','installment'] and o.company_id and o.company_id.currency_id.symbol or '' ]] + [[ ol.type in ['otherdeduct','installment'] and formatLang(ol.total, dp='Account') or '' ]] [[ ol.type in ['otherdeduct','installment'] and o.company_id and o.company_id.currency_id.symbol or '' ]] @@ -561,7 +561,7 @@ Net Amount([[ o.company_id and o.company_id.currency_id.symbol or '' ]]) - [[ formatLang(o.net) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]] + [[ formatLang(o.net, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] diff --git a/addons/hr_payroll/report/report_employees_detail.rml b/addons/hr_payroll/report/report_employees_detail.rml index 67a49abc4c6..87ec7a3d3d9 100644 --- a/addons/hr_payroll/report/report_employees_detail.rml +++ b/addons/hr_payroll/report/report_employees_detail.rml @@ -684,47 +684,47 @@ [[ get_monthly_total()[0] ]] - [[ formatLang(get_monthly_total()[1]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + [[ formatLang(get_monthly_total()[1], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[2], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[3], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[4], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[5], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[6], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[7], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[8], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[9], dp='Account')) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[10], dp='Account']) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[11], dp='Account']) or removeParentNode('para') ]][[ company.currency_id.symbol ]] + + + [[ formatLang(get_monthly_total()[12], dp='Account']) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - [[ formatLang(get_monthly_total()[2]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_monthly_total()[3]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_monthly_total()[4]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_monthly_total()[5]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_monthly_total()[6]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_monthly_total()[7]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_monthly_total()[8]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_monthly_total()[9]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_monthly_total()[10]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_monthly_total()[11]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_monthly_total()[12]) or removeParentNode('para') ]][[ company.currency_id.symbol ]] - - - [[ formatLang(get_total()) ]][[ company.currency_id.symbol ]] + [[ formatLang(get_total(), dp='Account') ]][[ company.currency_id.symbol ]] - \ No newline at end of file + diff --git a/addons/hr_payroll/report/report_payroll_advice.rml b/addons/hr_payroll/report/report_payroll_advice.rml index bd1b0c632cd..3e0aa3c0af1 100644 --- a/addons/hr_payroll/report/report_payroll_advice.rml +++ b/addons/hr_payroll/report/report_payroll_advice.rml @@ -257,10 +257,10 @@ [[ line['name'] ]] - [[ formatLang(line['amount' ]) ]] [[ (company.currency_id and company.currency_id.symbol) or '' ]] + [[ formatLang(line['amount'], dp='Account') ]] [[ company.currency_id.symbol ]] - [[ formatLang(line['bysal']) ]] [[ (company.currency_id and company.currency_id.symbol) or '' ]] + [[ formatLang(line['bysal'], dp='Account') ]] [[ company.currency_id.symbol ]] [[ line['acc_no'] ]] @@ -282,10 +282,10 @@ Total: - [[ formatLang(get_total()) ]] [[ (company.currency_id and company.currency_id.symbol) or '' ]] + [[ formatLang(get_total(), dp='Account') ]] [[ company.currency_id.symbol ]] - [[ formatLang(get_bysal_total()) ]] [[ (company.currency_id and company.currency_id.symbol) or '' ]] + [[ formatLang(get_bysal_total(), dp='Account') ]] [[ company.currency_id.symbol ]] @@ -361,4 +361,4 @@ - \ No newline at end of file + diff --git a/addons/hr_payroll/report/report_year_report.rml b/addons/hr_payroll/report/report_year_report.rml index 4314b91a552..564e87d04ab 100644 --- a/addons/hr_payroll/report/report_year_report.rml +++ b/addons/hr_payroll/report/report_year_report.rml @@ -248,66 +248,66 @@ - [[ (e[1]!='' and formatLang(e[1])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[1]!='' and formatLang(e[1], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[2]!='' and formatLang(e[2])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[2]!='' and formatLang(e[2], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[3]!='' and formatLang(e[3])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[3]!='' and formatLang(e[3], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[4]!='' and formatLang(e[4])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[4]!='' and formatLang(e[4], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[5]!='' and formatLang(e[5])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[5]!='' and formatLang(e[5], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[6]!='' and formatLang(e[6])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[6]!='' and formatLang(e[6], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[7]!='' and formatLang(e[7])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[7]!='' and formatLang(e[7], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[8]!='' and formatLang(e[8])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[8]!='' and formatLang(e[8], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[9]!='' and formatLang(e[9])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[9]!='' and formatLang(e[9], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[10]!='' and formatLang(e[10])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[10]!='' and formatLang(e[10], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[11]!='' and formatLang(e[11])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[11]!='' and formatLang(e[11], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ (e[12]!='' and formatLang(e[12])) or removeParentNode('font') ]] [[company.currency_id.symbol]] + [[ (e[12]!='' and formatLang(e[12], dp='Account')) or removeParentNode('font') ]] [[company.currency_id.symbol]] - [[ formatLang(e[13]) ]] [[company.currency_id.symbol]] + [[ formatLang(e[13], dp='Account') ]] [[company.currency_id.symbol]] @@ -321,47 +321,47 @@ Total - [[ formatLang(t[1]) or removeParentNode('para') ]] [[company.currency_id.symbol]] + [[ formatLang(t[1], dp='Account') or removeParentNode('para') ]] [[company.currency_id.symbol]] - [[ formatLang(t[2]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[2], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(t[3]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[3], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(t[4]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[4], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(t[5]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[5], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(t[6]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[6], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(t[7]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[7], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(t[8]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[8], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(t[9]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[9], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(t[10]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[10], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(t[11]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[11], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(t[12]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[12], dp='Account') or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(get_total()) ]] [[company.currency_id.symbol]] + [[ formatLang(get_total(), dp='Account') ]] [[company.currency_id.symbol]] - \ No newline at end of file + diff --git a/addons/hr_recruitment/report/hr_recruitment_report.py b/addons/hr_recruitment/report/hr_recruitment_report.py index 3ba27af9228..5234e933813 100644 --- a/addons/hr_recruitment/report/hr_recruitment_report.py +++ b/addons/hr_recruitment/report/hr_recruitment_report.py @@ -21,6 +21,8 @@ import tools from osv import fields,osv from hr_recruitment import hr_recruitment +from decimal_precision import decimal_precision as dp + AVAILABLE_STATES = [ ('draft','New'), @@ -56,9 +58,9 @@ class hr_recruitment_report(osv.osv): 'type_id': fields.many2one('hr.recruitment.degree', 'Degree'), 'department_id': fields.many2one('hr.department','Department',readonly=True), 'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'), - 'salary_prop': fields.float("Salary Proposed"), - 'salary_prop_avg': fields.float("Avg Salary Proposed", group_operator="avg"), - 'salary_exp': fields.float("Salary Expected"), + 'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Account')), + 'salary_prop_avg' : fields.float("Avg Salary Proposed", group_operator="avg", digits_compute=dp.get_precision('Account')), + 'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Account')), 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True), 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact Name',readonly=True), 'available': fields.float("Availability"), @@ -66,7 +68,6 @@ class hr_recruitment_report(osv.osv): help="Number of Days to close the project issue"), 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg", help="Number of Days to close the project issue"), - } _order = 'date desc' def init(self, cr): diff --git a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py index 84ef868ab81..d20ad3a5f4c 100644 --- a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py +++ b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py @@ -21,6 +21,8 @@ import tools from osv import fields,osv +from decimal_precision import decimal_precision as dp + class hr_timesheet_report(osv.osv): _name = "hr.timesheet.report" @@ -40,7 +42,7 @@ class hr_timesheet_report(osv.osv): 'user_id': fields.many2one('res.users', 'User',readonly=True), 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True), 'company_id': fields.many2one('res.company', 'Company',readonly=True), - 'cost': fields.float('Cost',readonly=True), + 'cost': fields.float('Cost',readonly=True, digits_compute=dp.get_precision('Account')), 'quantity': fields.float('Quantity',readonly=True), } diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py index 91af27db4ad..2ca21a3031c 100644 --- a/addons/marketing_campaign/marketing_campaign.py +++ b/addons/marketing_campaign/marketing_campaign.py @@ -28,6 +28,7 @@ from traceback import format_exception from sys import exc_info from tools.safe_eval import safe_eval as eval import re +from decimal_precision import decimal_precision as dp from osv import fields, osv import netsvc @@ -108,7 +109,7 @@ Normal - the campaign runs normally and automatically sends all emails and repor 'State',), 'activity_ids': fields.one2many('marketing.campaign.activity', 'campaign_id', 'Activities'), - 'fixed_cost': fields.float('Fixed Cost', help="Fixed cost for running this campaign. You may also specify variable cost and revenue on each campaign activity. Cost and Revenue statistics are included in Campaign Reporting."), + 'fixed_cost': fields.float('Fixed Cost', help="Fixed cost for running this campaign. You may also specify variable cost and revenue on each campaign activity. Cost and Revenue statistics are included in Campaign Reporting.", digits_compute=dp.get_precision('Purchase Price')), } _defaults = { @@ -397,8 +398,8 @@ class marketing_campaign_activity(osv.osv): 'from_ids': fields.one2many('marketing.campaign.transition', 'activity_to_id', 'Previous Activities'), - 'variable_cost': fields.float('Variable Cost', help="Set a variable cost if you consider that every campaign item that has reached this point has entailed a certain cost. You can get cost statistics in the Reporting section"), - 'revenue': fields.float('Revenue', help="Set an expected revenue if you consider that every campaign item that has reached this point has generated a certain revenue. You can get revenue statistics in the Reporting section"), + 'variable_cost': fields.float('Variable Cost', help="Set a variable cost if you consider that every campaign item that has reached this point has entailed a certain cost. You can get cost statistics in the Reporting section", digits_compute=dp.get_precision('Purchase Price')), + 'revenue': fields.float('Revenue', help="Set an expected revenue if you consider that every campaign item that has reached this point has generated a certain revenue. You can get revenue statistics in the Reporting section", digits_compute=dp.get_precision('Sale Price')), 'signal': fields.char('Signal', size=128, help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'), 'keep_if_condition_not_met': fields.boolean("Don't delete workitems", diff --git a/addons/marketing_campaign/report/campaign_analysis.py b/addons/marketing_campaign/report/campaign_analysis.py index a4dbb1c4769..ceab0eab519 100644 --- a/addons/marketing_campaign/report/campaign_analysis.py +++ b/addons/marketing_campaign/report/campaign_analysis.py @@ -20,6 +20,8 @@ ############################################################################## import tools from osv import fields, osv +from decimal_precision import decimal_precision as dp + class campaign_analysis(osv.osv): _name = "campaign.analysis" @@ -61,8 +63,8 @@ class campaign_analysis(osv.osv): 'country_id': fields.related('partner_id','address', 'country_id', type='many2one', relation='res.country',string='Country'), 'total_cost' : fields.function(_total_cost, string='Cost', method=True, - type="float" ), - 'revenue': fields.float('Revenue',digits=(16,2),readonly=True), + type="float", digits_compute=dp.get_precision('Purchase Price')), + 'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Sale Price')), 'count' : fields.integer('# of Actions', readonly=True), 'state': fields.selection([('todo', 'To Do'), ('exception', 'Exception'), ('done', 'Done'), diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml index b0f197a2f1d..5e7163f37fb 100644 --- a/addons/mrp_repair/report/order.rml +++ b/addons/mrp_repair/report/order.rml @@ -365,7 +365,7 @@ Net Total : - [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Sale Price'))]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_untaxed, dp='Sale Price')]] [[ o.pricelist_id.currency_id. symbol ]] @@ -379,7 +379,7 @@ Taxes: - [[ formatLang(o.amount_tax, digits=get_digits(dp='Account'))]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_tax, dp='Account')]] [[ o.pricelist_id.currency_id. symbol ]] @@ -392,7 +392,7 @@ Total : - [[ formatLang(total(o), digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(total(o), dp='Sale Price') ]] [[ o.pricelist_id.currency_id. symbol ]] diff --git a/addons/point_of_sale/report/account_statement.rml b/addons/point_of_sale/report/account_statement.rml index c61d0347d84..33c6c62cd6e 100644 --- a/addons/point_of_sale/report/account_statement.rml +++ b/addons/point_of_sale/report/account_statement.rml @@ -214,10 +214,10 @@ [[ formatLang(statement.closing_date,date_time=True)]] - [[ formatLang(statement.balance_start)]] [[ company.currency_id.symbol ]] + [[ formatLang(statement.balance_start, dp='Account') ]][[ company.currency_id.symbol ]] - [[ formatLang(statement.balance_end_real)]] [[ company.currency_id.symbol ]] + [[ formatLang(statement.balance_end_real, dp='Account') ]][[ company.currency_id.symbol ]] @@ -250,7 +250,7 @@ [[ line_ids.partner_id.name ]] - [[ formatLang(line_ids.amount) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line_ids.amount, dp='Account') ]] [[ company.currency_id.symbol ]] @@ -267,7 +267,7 @@ Total : - [[ formatLang(get_total(statement.line_ids)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(get_total(statement.line_ids), dp='Account') ]] [[ company.currency_id.symbol ]] @@ -282,4 +282,4 @@ - \ No newline at end of file + diff --git a/addons/point_of_sale/report/pos_details.rml b/addons/point_of_sale/report/pos_details.rml index ae9d7252984..7aa2c3a8ea0 100644 --- a/addons/point_of_sale/report/pos_details.rml +++ b/addons/point_of_sale/report/pos_details.rml @@ -238,13 +238,13 @@ [ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]] - [[ formatLang(line_ids['price_unit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line_ids['price_unit'], dp='Sale Price') ]] [[ company.currency_id.symbol ]] [[ formatLang(line_ids['qty']) ]] [[ line_ids['uom'] ]] - [[ formatLang(line_ids['discount']) ]] + [[ formatLang(line_ids['discount'], dp='Sale Price') ]] [[ getinvoice(line_ids['invoice_id'],user) or removeParentNode('font') ]] @@ -306,7 +306,7 @@ [[ p['name'] or removeParentNode('para') ]] - [[ formatLang(p['sum']) or removeParentNode('tr') ]] [[ company.currency_id.symbol ]] + [[ formatLang(p['sum'], dp='Account') or removeParentNode('tr') ]] [[ company.currency_id.symbol ]] @@ -335,7 +335,7 @@ Sales total(Revenue) - [[ formatLang(getsalestotal2(data['form'],user)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsalestotal2(data['form'],user), dp='Sale Price') ]] [[ company.currency_id.symbol ]] @@ -351,7 +351,7 @@ Total invoiced - [[ formatLang(getsuminvoice2(data['form'],user)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsuminvoice2(data['form'],user), dp='Sale Price') ]] [[ company.currency_id.symbol ]] @@ -359,7 +359,7 @@ Total discount - [[ formatLang(getsumdisc(data['form'],user)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsumdisc(data['form'],user), dp='Sale Price') ]] [[ company.currency_id.symbol ]] @@ -367,7 +367,7 @@ Total paid - [[ formatLang(getpaidtotal2(data['form'],user)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(getpaidtotal2(data['form'],user), dp='Sale Price') ]] [[ company.currency_id.symbol ]] @@ -375,7 +375,7 @@ Total of the day - [[ formatLang(gettotalofthaday(data['form'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang(gettotalofthaday(data['form']), dp='Sale Price') ]] [[ company.currency_id.symbol ]] diff --git a/addons/point_of_sale/report/pos_payment_report_date.rml b/addons/point_of_sale/report/pos_payment_report_date.rml index b8f86233319..ba7764fed28 100644 --- a/addons/point_of_sale/report/pos_payment_report_date.rml +++ b/addons/point_of_sale/report/pos_payment_report_date.rml @@ -155,13 +155,13 @@ [[ formatLang(line_ids['qty']) ]] [[line_ids['uom'] ]] - [[ formatLang(line_ids['discount']) ]] + [[ formatLang(line_ids['discount'], dp='Sale Price') ]] - [[ formatLang(line_ids['price_unit']) ]] + [[ formatLang(line_ids['price_unit'], dp='Sale Price') ]] [[ company.currency_id.symbol ]] - [[ formatLang(line_ids['total']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line_ids['total'], dp='Sale Price') ]] [[ company.currency_id.symbol ]] @@ -177,7 +177,7 @@ Total: - [[ formatLang(pos_payment_date_total(data['form'])) or removeParentNode('blockTable')]] [[ company.currency_id.symbol ]] + [[ formatLang(pos_payment_date_total(data['form']), dp='Sale Price') or removeParentNode('blockTable')]] [[ company.currency_id.symbol ]] @@ -185,4 +185,4 @@ - \ No newline at end of file + diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml index c12a04b586f..4b143d0f961 100644 --- a/addons/purchase/report/order.rml +++ b/addons/purchase/report/order.rml @@ -352,7 +352,7 @@ Taxes : - [[ formatLang(o.amount_tax, digits=get_digits(dp='Purchase Price')) ]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_tax, dp='Purchase Price') ]] [[ o.pricelist_id.currency_id. symbol ]] diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml index d80b07fa06f..807e552cc80 100644 --- a/addons/sale/report/sale_order.rml +++ b/addons/sale/report/sale_order.rml @@ -334,7 +334,7 @@ Net Total : - [[ formatLang(o.amount_untaxed , digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_untaxed, dp='Sale Price') ]] [[ o.pricelist_id.currency_id.symbol ]] @@ -347,7 +347,7 @@ Taxes : - [[ formatLang(o.amount_tax , digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_tax, dp='Sale Price') ]] [[ o.pricelist_id.currency_id.symbol ]] @@ -360,7 +360,7 @@ Total : - [[ formatLang(o.amount_total , digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_total, dp='Sale Price') ]] [[ o.pricelist_id.currency_id.symbol ]] diff --git a/addons/stock/report/lot_overview.rml b/addons/stock/report/lot_overview.rml index d68010b35e6..1bb1b5990ca 100644 --- a/addons/stock/report/lot_overview.rml +++ b/addons/stock/report/lot_overview.rml @@ -181,10 +181,10 @@ [[formatLang( p['prod_qty']) ]] [[ p['uom'] ]] - [[ formatLang(p['price']) ]] + [[ formatLang(p['price'], dp='Account') ]] - [[ formatLang(p['price_value']) ]] [[ o.company_id.currency_id.symbol]] + [[ formatLang(p['price_value'], dp='Account') ]] [[ o.company_id.currency_id.symbol]] @@ -198,7 +198,7 @@ Total: - [[ formatLang(price_total()) ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(price_total(), dp='Account') ]] [[ o.company_id.currency_id.symbol ]] @@ -215,7 +215,7 @@ - [[ formatLang(grand_total_price()) ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(grand_total_price(), dp='Account') ]] [[ o.company_id.currency_id.symbol ]] @@ -224,4 +224,4 @@ - \ No newline at end of file + diff --git a/addons/stock/report/lot_overview_all.rml b/addons/stock/report/lot_overview_all.rml index e46a2966c38..d2e628152f0 100644 --- a/addons/stock/report/lot_overview_all.rml +++ b/addons/stock/report/lot_overview_all.rml @@ -181,10 +181,10 @@ [[formatLang( p['prod_qty']) ]] [[ p['uom'] ]] - [[ formatLang(p['price']) ]] + [[ formatLang(p['price'], dp='Account') ]] - [[ formatLang(p['price_value']) ]] [[ o.company_id.currency_id.symbol]] + [[ formatLang(p['price_value'], dp='Account') ]] [[ o.company_id.currency_id.symbol]] @@ -198,7 +198,7 @@ Total: - [[ formatLang(price_total()) ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(price_total(), dp='Account') ]] [[ o.company_id.currency_id.symbol ]] @@ -215,7 +215,7 @@ - [[ formatLang(grand_total_price()) ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(grand_total_price(), dp='Account') ]] [[ o.company_id.currency_id.symbol ]] @@ -224,4 +224,4 @@ - \ No newline at end of file +