From 0159340e87b8b15489f838b7b6c5d07fe5a96891 Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 28 Sep 2012 17:07:12 +0530 Subject: [PATCH 01/20] [IMP] imporve amount with curruncy in hr_expense bzr revid: nco@tinyerp.com-20120928113712-wcy20zoas4ixkk7x --- addons/hr_expense/report/expense.rml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_expense/report/expense.rml b/addons/hr_expense/report/expense.rml index bf456cfc4d6..7efe2112f95 100644 --- a/addons/hr_expense/report/expense.rml +++ b/addons/hr_expense/report/expense.rml @@ -277,7 +277,7 @@ Total: - [[ formatLang(o.amount) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] From de647d9f628f57a812a10e94a660d82f965162fd Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 28 Sep 2012 17:15:12 +0530 Subject: [PATCH 02/20] [IMP] imporve amount with curruncy in report_intrastat bzr revid: nco@tinyerp.com-20120928114512-di7475khiaz1cpz7 --- addons/report_intrastat/report/invoice.rml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml index c07bd06f402..ec23b9b091a 100644 --- a/addons/report_intrastat/report/invoice.rml +++ b/addons/report_intrastat/report/invoice.rml @@ -301,7 +301,7 @@ Total (excl. taxes): - [[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] @@ -314,7 +314,7 @@ Taxes: - [[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_tax, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] @@ -327,7 +327,7 @@ Total (inclu. taxes): - [[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]] + [[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] From 74eeaba4866e5c5488bd7dc5b87a99ac82a27464 Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 28 Sep 2012 17:16:25 +0530 Subject: [PATCH 03/20] [IMP] imporve amount with curruncy in mrp_repair , order.rml bzr revid: nco@tinyerp.com-20120928114625-nud95lo4y0sao7ya --- addons/mrp_repair/report/order.rml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml index be5737d4b85..a688c4047a0 100644 --- a/addons/mrp_repair/report/order.rml +++ b/addons/mrp_repair/report/order.rml @@ -367,7 +367,7 @@ Taxes: - [[ formatLang(o.amount_tax, dp='Account')]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_tax, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] From b3dde42f5b2cfab66705812673f7729b2a73fadd Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 28 Sep 2012 17:17:43 +0530 Subject: [PATCH 04/20] [IMP] imporve amount with curruncy in point_of_sale , pos_lines.rml bzr revid: nco@tinyerp.com-20120928114743-we0dvo10wv7d3its --- addons/point_of_sale/report/pos_lines.rml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/point_of_sale/report/pos_lines.rml b/addons/point_of_sale/report/pos_lines.rml index be394ed4f16..e98f6bcd9f1 100644 --- a/addons/point_of_sale/report/pos_lines.rml +++ b/addons/point_of_sale/report/pos_lines.rml @@ -202,7 +202,7 @@ Net Total : - [[ formatLang(o.amount_total) ]] [[o.pricelist_id.currency_id.symbol ]] + [[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] @@ -215,7 +215,7 @@ Taxes : - [[ formatLang(o.amount_tax) ]] [[o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_tax, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] @@ -228,7 +228,7 @@ Total: - [[ formatLang(o.amount_total + o.amount_tax) ]] [[o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_total + o.amount_tax, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] From 04f64ecb7068e0bb4a016acfdc8c7fcc20eb9249 Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 28 Sep 2012 17:28:39 +0530 Subject: [PATCH 06/20] [IMP] improve order.rml in mrp_repair bzr revid: nco@tinyerp.com-20120928115839-4fpootp5m4exrw4e --- addons/mrp_repair/report/order.rml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml index a688c4047a0..dd7788910b5 100644 --- a/addons/mrp_repair/report/order.rml +++ b/addons/mrp_repair/report/order.rml @@ -353,7 +353,7 @@ Net Total : - [[ formatLang(o.amount_untaxed, dp='Sale Price')]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(o.amount_untaxed, dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]] @@ -367,7 +367,7 @@ Taxes: - [[ formatLang(o.amount_tax, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] + [[ formatLang(o.amount_tax, dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]] @@ -380,7 +380,7 @@ Total : - [[ formatLang(total(o), dp='Sale Price') ]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(total(o), dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]] From 7f3455cdc89e00e9e02c03462523f3bf945894ca Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 28 Sep 2012 17:43:13 +0530 Subject: [PATCH 07/20] [IMP] point_of_sale , pos_lines.rml bzr revid: nco@tinyerp.com-20120928121313-r2iicypzvjlyrzjt --- addons/point_of_sale/report/pos_lines.rml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/point_of_sale/report/pos_lines.rml b/addons/point_of_sale/report/pos_lines.rml index e98f6bcd9f1..1eff03d1cd2 100644 --- a/addons/point_of_sale/report/pos_lines.rml +++ b/addons/point_of_sale/report/pos_lines.rml @@ -202,7 +202,7 @@ Net Total : - [[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] + [[ formatLang(o.amount_total, currency_obj=o.pricelist_id.currency_id) ]] @@ -215,7 +215,7 @@ Taxes : - [[ formatLang(o.amount_tax, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] + [[ formatLang(o.amount_tax, currency_obj=o.pricelist_id.currency_id) ]] @@ -228,7 +228,7 @@ Total: - [[ formatLang(o.amount_total + o.amount_tax, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] + [[ formatLang(o.amount_total + o.amount_tax, currency_obj=o.pricelist_id.currency_id) ]] From 8afc4b0d16316a4e7fd12ec0d0bf1796fd3d2536 Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 28 Sep 2012 17:59:20 +0530 Subject: [PATCH 08/20] [IMP] expense.rml bzr revid: nco@tinyerp.com-20120928122920-rah1697pni2xnwk3 --- addons/hr_expense/report/expense.rml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_expense/report/expense.rml b/addons/hr_expense/report/expense.rml index 7efe2112f95..3e07516c01b 100644 --- a/addons/hr_expense/report/expense.rml +++ b/addons/hr_expense/report/expense.rml @@ -231,7 +231,7 @@ [[ formatLang(line.unit_quantity) ]] - [[ formatLang(line.total_amount) ]] [[ o.currency_id.symbol ]] + [[ formatLang(line.total_amount, currency_obj=o.currency_id) ]] @@ -277,7 +277,7 @@ Total: - [[ formatLang(o.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] + [[ formatLang(o.amount, currency_obj=o.currency_id) ]] From a634a1a91f318052161a9ef4f2360c174a12282b Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 28 Sep 2012 18:10:57 +0530 Subject: [PATCH 09/20] expense.sxw pos_lines.sxw and pos_lines.rml bzr revid: nco@tinyerp.com-20120928124057-26jmpyivpgs536cp --- addons/point_of_sale/report/pos_lines.rml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/report/pos_lines.rml b/addons/point_of_sale/report/pos_lines.rml index 1eff03d1cd2..1ed8e33eede 100644 --- a/addons/point_of_sale/report/pos_lines.rml +++ b/addons/point_of_sale/report/pos_lines.rml @@ -186,7 +186,7 @@ [[ formatLang(l.discount) ]] - [[ formatLang(l.price_subtotal) ]] [[o.pricelist_id.currency_id. symbol ]] + [[ formatLang(l.price_subtotal, currency_obj=o.pricelist_id.currency_id) ]] From 99a3c0c074aaa0430f341ec10f1c5f52ca8f0170 Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 28 Sep 2012 18:36:57 +0530 Subject: [PATCH 10/20] [IMP] imorove report_intrastat/report/invoice.sxw and rml bzr revid: nco@tinyerp.com-20120928130657-2ruakuwnibj02hvb --- addons/report_intrastat/report/invoice.rml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml index ec23b9b091a..a6f94a0e2a8 100644 --- a/addons/report_intrastat/report/invoice.rml +++ b/addons/report_intrastat/report/invoice.rml @@ -245,7 +245,7 @@ [[ l.discount and formatLang (l.discount) or '' ]] - [[ formatLang(l.price_subtotal) ]] [[ o.currency_id.symbol ]] + [[ formatLang(l.price_subtotal, currency_obj=o.currency_id) ]] @@ -301,7 +301,7 @@ Total (excl. taxes): - [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] + [[ formatLang(o.amount_untaxed, currency_obj=o.currency_id) ]] @@ -314,7 +314,7 @@ Taxes: - [[ formatLang(o.amount_tax, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] + [[ formatLang(o.amount_tax, currency_obj=o.currency_id) ]] @@ -327,7 +327,7 @@ Total (inclu. taxes): - [[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] + [[ formatLang(o.amount_total, currency_obj=o.currency_id) ]] @@ -363,7 +363,7 @@ [[ formatLang(t.base, 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, 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, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] From a9676cfd8c892e1daf45a4f148b794d762e8f84d Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Mon, 1 Oct 2012 16:38:02 +0530 Subject: [PATCH 11/20] [IMP] amout with currency. bzr revid: nco@tinyerp.com-20121001110802-r3l169i2ka73t2rh --- addons/account/project/report/analytic_balance.rml | 6 +++--- addons/account/project/report/cost_ledger.rml | 8 ++++---- .../project/report/inverted_analytic_balance.rml | 6 +++--- addons/account/report/account_print_overdue.rml | 2 +- .../report/report_contribution_register.rml | 4 ++-- addons/hr_payroll/report/report_payslip.rml | 2 +- addons/hr_payroll/report/report_payslip_details.rml | 4 ++-- .../report/report_hr_salary_employee_bymonth.rml | 2 +- .../report/report_payroll_advice.rml | 8 ++++---- .../report/report_payslip_details.rml | 2 +- addons/lunch/report/order.rml | 6 +++--- addons/mrp_repair/report/order.rml | 4 ++-- addons/point_of_sale/report/account_statement.rml | 8 ++++---- .../report/all_closed_cashbox_of_the_day.rml | 6 +++--- addons/point_of_sale/report/pos_details.rml | 12 ++++++------ addons/point_of_sale/report/pos_payment_report.rml | 2 +- .../point_of_sale/report/pos_payment_report_user.rml | 2 +- addons/point_of_sale/report/pos_users_product.rml | 4 ++-- addons/report_intrastat/report/invoice.rml | 2 +- addons/stock/report/lot_overview.rml | 6 +++--- addons/stock/report/lot_overview_all.rml | 6 +++--- 21 files changed, 51 insertions(+), 51 deletions(-) diff --git a/addons/account/project/report/analytic_balance.rml b/addons/account/project/report/analytic_balance.rml index 0c488eac400..1754988f7d6 100644 --- a/addons/account/project/report/analytic_balance.rml +++ b/addons/account/project/report/analytic_balance.rml @@ -163,7 +163,7 @@ [[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'credit')) ]] - [[ formatLang(sum_balance(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]] + [[ formatLang(sum_balance(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]] [[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'quantity')) ]] @@ -187,7 +187,7 @@ [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'credit')) ]] - [[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]] + [[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]] [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'quantity')) ]] @@ -211,7 +211,7 @@ [[ formatLang(move_g['credit']) ]] - [[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol ]] + [[ formatLang(move_g['balance'], currency_obj = company.currency_id) ]] [[ formatLang(move_g['quantity']) ]] diff --git a/addons/account/project/report/cost_ledger.rml b/addons/account/project/report/cost_ledger.rml index 7500b655ab3..1099a8b8b4e 100644 --- a/addons/account/project/report/cost_ledger.rml +++ b/addons/account/project/report/cost_ledger.rml @@ -224,7 +224,7 @@ [[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id) ]] @@ -245,7 +245,7 @@ [[ formatLang (account_sum_credit(account,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang (account_sum_balance(account,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol ]] + [[ formatLang (account_sum_balance(account,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id) ]] @@ -266,7 +266,7 @@ [[ formatLang( move_g['credit']) ]] - [[ formatLang( move_g['balance']) ]] [[ company.currency_id.symbol ]] + [[ formatLang( move_g['balance'], currency_obj = company.currency_id) ]] @@ -290,7 +290,7 @@ [[ formatLang( move_a['credit']) ]] - [[ formatLang( move_a['balance']) ]] [[ company.currency_id.symbol]] + [[ formatLang( move_a['balance'], currency_obj = company.currency_id)]] diff --git a/addons/account/project/report/inverted_analytic_balance.rml b/addons/account/project/report/inverted_analytic_balance.rml index f112ec8fbd3..54b6878c407 100644 --- a/addons/account/project/report/inverted_analytic_balance.rml +++ b/addons/account/project/report/inverted_analytic_balance.rml @@ -164,7 +164,7 @@ [[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]] - [[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol]] + [[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]] [[ formatLang(sum_quantity(objects,data['form']['date1'],data['form']['date2'])) ]] @@ -188,7 +188,7 @@ [[formatLang(move_g['credit'])]] - [[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol]] + [[ formatLang(move_g['balance'], currency_obj = company.currency_id)]] [[formatLang(move_g['quantity']) ]] @@ -212,7 +212,7 @@ [[ formatLang(move_a['credit']) ]] - [[ formatLang(move_a['balance']) ]] [[ company.currency_id.symbol]] + [[ formatLang(move_a['balance'], currency_obj = company.currency_id)]] [[ formatLang(move_a['quantity']) ]] diff --git a/addons/account/report/account_print_overdue.rml b/addons/account/report/account_print_overdue.rml index 2d4238823da..83d3162cf6d 100644 --- a/addons/account/report/account_print_overdue.rml +++ b/addons/account/report/account_print_overdue.rml @@ -216,7 +216,7 @@ [[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]] - [[ time.strftime('%Y-%m-%d') > formatLang((line['date_maturity'])) and formatLang(line['debit'] - line['credit']) ]] [[ company.currency_id.symbol ]] + [[ time.strftime('%Y-%m-%d') > formatLang((line['date_maturity'])) and formatLang(line['debit'] - line['credit'], currency_obj = company.currency_id) ]] [[ line['blocked'] and 'X' or '' ]] diff --git a/addons/hr_payroll/report/report_contribution_register.rml b/addons/hr_payroll/report/report_contribution_register.rml index b3a5de9753d..8a5897c6091 100644 --- a/addons/hr_payroll/report/report_contribution_register.rml +++ b/addons/hr_payroll/report/report_contribution_register.rml @@ -206,7 +206,7 @@ [[ formatLang(r['amount']) ]] - [[ formatLang(r['total']) ]] [[o.company_id and o.company_id.currency_id.symbol or '']] + [[ formatLang(r['total'], currency_obj = o.company_id and o.company_id.currency_id)]] @@ -222,7 +222,7 @@ Total: - [[ formatLang(sum_total()) ]] [[o.company_id and o.company_id.currency_id.symbol or '']] + [[ formatLang(sum_total(), currency_obj = o.company_id and o.company_id.currency_id)]] diff --git a/addons/hr_payroll/report/report_payslip.rml b/addons/hr_payroll/report/report_payslip.rml index 4d96e4b5ef7..7b419ddc2ee 100644 --- a/addons/hr_payroll/report/report_payslip.rml +++ b/addons/hr_payroll/report/report_payslip.rml @@ -293,7 +293,7 @@ [[ formatLang(p.amount) ]] - [[ formatLang(p.total) ]] [[o.company_id and o.company_id.currency_id.symbol or '']] + [[ formatLang(p.total, currency_obj = o.company_id and o.company_id.currency_id)]] diff --git a/addons/hr_payroll/report/report_payslip_details.rml b/addons/hr_payroll/report/report_payslip_details.rml index fe6a10dd1f5..83e9e5c09a1 100644 --- a/addons/hr_payroll/report/report_payslip_details.rml +++ b/addons/hr_payroll/report/report_payslip_details.rml @@ -334,7 +334,7 @@ [[ '..'*h['level'] ]][[ h['rule_category'] ]][[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]] - [[ formatLang(h['total']) ]] [[o.company_id and o.company_id.currency_id.symbol or '']] [[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]] + [[ formatLang(h['total'], currency_obj = o.company_id and o.company_id.currency_id)]] [[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]] @@ -391,7 +391,7 @@ [[ formatLang(r['amount']) ]] - [[ formatLang(r['total']) ]] [[ o.company_id and o.company_id.currency_id.symbol or '']][[ r.get('register_name', False) and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font')]] + [[ formatLang(r['total'], currency_obj = o.company_id and o.company_id.currency_id)]][[ r.get('register_name', False) and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font')]] diff --git a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml index 8f2a57d2018..0c0353a4045 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml +++ b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml @@ -284,7 +284,7 @@ [[ formatLang(t[12]) or removeParentNode('para')]] [[company.currency_id.symbol]] - [[ formatLang(get_total()) ]] [[company.currency_id.symbol]] + [[ formatLang(get_total(), currency_obj = company.currency_id)]] diff --git a/addons/l10n_in_hr_payroll/report/report_payroll_advice.rml b/addons/l10n_in_hr_payroll/report/report_payroll_advice.rml index 8ca1bae5ba5..879314a24d9 100644 --- a/addons/l10n_in_hr_payroll/report/report_payroll_advice.rml +++ b/addons/l10n_in_hr_payroll/report/report_payroll_advice.rml @@ -247,7 +247,7 @@ [[ line['acc_no'] ]] - [[formatLang(line['bysal'])]] [[ (company.currency_id and company.currency_id.symbol) or '' ]] + [[formatLang(line['bysal'], currency_obj = company.currency_id) ]] [[ line['debit_credit'] ]] @@ -296,7 +296,7 @@ [[ line['ifsc_code'] ]] - [[formatLang(line['bysal'])]] [[ (company.currency_id and company.currency_id.symbol) or '' ]] + [[formatLang(line['bysal'], currency_obj = company.currency_id) ]] [[ line['debit_credit'] ]] @@ -321,7 +321,7 @@ - [[ o.line_ids==[] and removeParentNode('para') ]][[ formatLang(get_bysal_total()) ]] [[ (company.currency_id and company.currency_id.symbol) or '' ]] + [[ o.line_ids==[] and removeParentNode('para') ]][[ formatLang(get_bysal_total(), currency_obj = company.currency_id) ]] @@ -347,7 +347,7 @@ - [[ o.line_ids==[] and removeParentNode('para') ]][[ formatLang(get_bysal_total()) ]] [[ (company.currency_id and company.currency_id.symbol) or '' ]] + [[ o.line_ids==[] and removeParentNode('para') ]][[ formatLang(get_bysal_total(), currency_obj = company.currency_id) ]] diff --git a/addons/l10n_in_hr_payroll/report/report_payslip_details.rml b/addons/l10n_in_hr_payroll/report/report_payslip_details.rml index a7ab3db3185..76bf65c98ac 100644 --- a/addons/l10n_in_hr_payroll/report/report_payslip_details.rml +++ b/addons/l10n_in_hr_payroll/report/report_payslip_details.rml @@ -334,7 +334,7 @@ [[ '..'*h['level'] ]][[ h['rule_category'] ]][[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]] - [[ formatLang(h['total']) ]] [[o.company_id and o.company_id.currency_id.symbol or '']] [[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]] + [[ formatLang(h['total'], currency_obj = o.company_id and o.company_id.currency_id)]] [[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]] diff --git a/addons/lunch/report/order.rml b/addons/lunch/report/order.rml index b09b59bb96b..0a13beb622c 100644 --- a/addons/lunch/report/order.rml +++ b/addons/lunch/report/order.rml @@ -137,7 +137,7 @@ - [[ formatLang(get_total(o,objects)) ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]] + [[ formatLang(get_total(o,objects), currency_obj = o.company_id and o.company_id.currency_id) ]] @@ -155,7 +155,7 @@ [[ lines.descript]] - [[ lines.price ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]] + [[ formatLang(lines.price , currency_obj = o.company_id and o.company_id.currency_id) ]] @@ -172,7 +172,7 @@ Total : - [[ formatLang(get_nettotal()) ]] [[ (o.company_id and o.company_id.currency_id and o.company_id.currency_id.symbol) or '' ]] + [[ formatLang(get_nettotal(), currency_obj = o.company_id and o.company_id.currency_id) ]] diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml index dd7788910b5..5e1344ce95a 100644 --- a/addons/mrp_repair/report/order.rml +++ b/addons/mrp_repair/report/order.rml @@ -312,7 +312,7 @@ [[ formatLang(line.price_unit) ]] - [[ formatLang(line.price_subtotal) ]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(line.price_subtotal, currency_obj = o.pricelist_id.currency_id) ]] @@ -337,7 +337,7 @@ [[ formatLang(fees.price_unit) ]] - [[ formatLang(fees.price_subtotal) ]] [[ o.pricelist_id.currency_id. symbol ]] + [[ formatLang(fees.price_subtotal, currency_obj = o.pricelist_id.currency_id) ]] diff --git a/addons/point_of_sale/report/account_statement.rml b/addons/point_of_sale/report/account_statement.rml index dc6e6c5e64c..0b633f3f7c4 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, dp='Account') ]][[ company.currency_id.symbol ]] + [[ formatLang(statement.balance_start, dp='Account', currency_obj = company.currency_id) ]] - [[ formatLang(statement.balance_end_real, dp='Account') ]][[ company.currency_id.symbol ]] + [[ formatLang(statement.balance_end_real, dp='Account', currency_obj = company.currency_id) ]] @@ -250,7 +250,7 @@ [[ line_ids.partner_id.name ]] - [[ formatLang(line_ids.amount, dp='Account') ]] [[ company.currency_id.symbol ]] + [[ formatLang(line_ids.amount, dp='Account', currency_obj=company.currency_id) ]] @@ -267,7 +267,7 @@ Total : - [[ formatLang(get_total(statement.line_ids), dp='Account') ]] [[ company.currency_id.symbol ]] + [[ formatLang(get_total(statement.line_ids), dp='Account', currency_obj = company.currency_id) ]] diff --git a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml index bb58c5e823d..4b7088cb86f 100644 --- a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml +++ b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml @@ -183,10 +183,10 @@ - [[ formatLang(get_net_total_starting(user)[1]) ]] [[company.currency_id.symbol]] + [[ formatLang(get_net_total_starting(user)[1], currency_obj = company.currency_id)]] - [[ formatLang(get_net_total(user)) ]] [[company.currency_id.symbol]] + [[ formatLang(get_net_total(user), currency_obj = company.currency_id)]] @@ -236,7 +236,7 @@ - [[ formatLang(line_ids['amount']) ]] [[company.currency_id.symbol]] + [[ formatLang(line_ids['amount'], currency_obj = company.currency_id)]] diff --git a/addons/point_of_sale/report/pos_details.rml b/addons/point_of_sale/report/pos_details.rml index b0019133009..aeecc82f7ef 100644 --- a/addons/point_of_sale/report/pos_details.rml +++ b/addons/point_of_sale/report/pos_details.rml @@ -252,7 +252,7 @@ [ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]] - [[ formatLang(line_ids['price_unit'], dp='Sale Price') ]] [[ company.currency_id.symbol ]] + [[ formatLang(line_ids['price_unit'], dp='Sale Price', currency_obj = company.currency_id) ]] [[ formatLang(line_ids['qty']) ]] [[ line_ids['uom'] ]] @@ -349,7 +349,7 @@ Sales total(Revenue) - [[ formatLang(getsalestotal2(), dp='Sale Price') ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsalestotal2(), dp='Sale Price', currency_obj = company.currency_id) ]] @@ -365,7 +365,7 @@ Total invoiced - [[ formatLang(getsuminvoice2(data['form']), dp='Sale Price') ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsuminvoice2(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]] @@ -373,7 +373,7 @@ Total discount - [[ formatLang(getsumdisc(), dp='Sale Price') ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsumdisc(), dp='Sale Price', currency_obj = company.currency_id) ]] @@ -381,7 +381,7 @@ Total paid - [[ formatLang(getpaidtotal2(), dp='Sale Price') ]] [[ company.currency_id.symbol ]] + [[ formatLang(getpaidtotal2(), dp='Sale Price', currency_obj = company.currency_id) ]] @@ -389,7 +389,7 @@ Total of the day - [[ formatLang(gettotalofthaday(data['form']), dp='Sale Price') ]] [[ company.currency_id.symbol ]] + [[ formatLang(gettotalofthaday(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]] diff --git a/addons/point_of_sale/report/pos_payment_report.rml b/addons/point_of_sale/report/pos_payment_report.rml index 757de687ee0..1e43b44cf05 100644 --- a/addons/point_of_sale/report/pos_payment_report.rml +++ b/addons/point_of_sale/report/pos_payment_report.rml @@ -183,7 +183,7 @@ [[ formatLang(line_ids['price_unit']) ]] - [[ formatLang(line_ids['total']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line_ids['total'], currency_obj = company.currency_id) ]] diff --git a/addons/point_of_sale/report/pos_payment_report_user.rml b/addons/point_of_sale/report/pos_payment_report_user.rml index 3105441aa0c..f945890d984 100644 --- a/addons/point_of_sale/report/pos_payment_report_user.rml +++ b/addons/point_of_sale/report/pos_payment_report_user.rml @@ -168,7 +168,7 @@ [[ formatLang(line_ids['price_unit']) ]] - [[ formatLang(line_ids['total']) ]] [[company.currency_id.symbol]] + [[ formatLang(line_ids['total'], currency_obj = company.currency_id)]] diff --git a/addons/point_of_sale/report/pos_users_product.rml b/addons/point_of_sale/report/pos_users_product.rml index f3a8cfd77e8..9758e924ada 100644 --- a/addons/point_of_sale/report/pos_users_product.rml +++ b/addons/point_of_sale/report/pos_users_product.rml @@ -191,7 +191,7 @@ [[ formatLang(line_ids['qty']) ]] [[line_ids['uom'] ]] - [[ formatLang(line_ids['amt']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line_ids['amt'], currency_obj = company.currency_id) ]] @@ -208,7 +208,7 @@ Total : - [[ formatLang(get_total(statement)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(get_total(statement), currency_obj = company.currency_id) ]] diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml index a6f94a0e2a8..fc410e04ce0 100644 --- a/addons/report_intrastat/report/invoice.rml +++ b/addons/report_intrastat/report/invoice.rml @@ -360,7 +360,7 @@ [[ t.name ]] - [[ formatLang(t.base, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]] + [[ formatLang(t.base, digits=get_digits(dp='Account'), currency_obj = o.currency_id) ]] [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] diff --git a/addons/stock/report/lot_overview.rml b/addons/stock/report/lot_overview.rml index 9662eede03b..82c402a3fdf 100644 --- a/addons/stock/report/lot_overview.rml +++ b/addons/stock/report/lot_overview.rml @@ -184,7 +184,7 @@ [[ formatLang(p['price'], dp='Account') ]] - [[ formatLang(p['price_value'], dp='Account') ]] [[ o.company_id.currency_id.symbol]] + [[ formatLang(p['price_value'], dp='Account', currency_obj = o.company_id.currency_id)]] @@ -198,7 +198,7 @@ Total: - [[ formatLang(price_total(), dp='Account') ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(price_total(), dp='Account', currency_obj = o.company_id.currency_id) ]] @@ -215,7 +215,7 @@ - [[ formatLang(grand_total_price(), dp='Account') ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(grand_total_price(), dp='Account', currency_obj = o.company_id.currency_id) ]] diff --git a/addons/stock/report/lot_overview_all.rml b/addons/stock/report/lot_overview_all.rml index 3b2dc5f7751..51b93c6323b 100644 --- a/addons/stock/report/lot_overview_all.rml +++ b/addons/stock/report/lot_overview_all.rml @@ -184,7 +184,7 @@ [[ formatLang(p['price'], dp='Account') ]] - [[ formatLang(p['price_value'], dp='Account') ]] [[ o.company_id.currency_id.symbol]] + [[ formatLang(p['price_value'], dp='Account', currency_obj = o.company_id.currency_id)]] @@ -198,7 +198,7 @@ Total: - [[ formatLang(price_total(), dp='Account') ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(price_total(), dp='Account', currency_obj = o.company_id.currency_id) ]] @@ -215,7 +215,7 @@ - [[ formatLang(grand_total_price(), dp='Account') ]] [[ o.company_id.currency_id.symbol ]] + [[ formatLang(grand_total_price(), dp='Account', currency_obj = o.company_id.currency_id) ]] From 082f70cb6f33f242e276e64706188a81c3263cc9 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Tue, 2 Oct 2012 12:28:32 +0530 Subject: [PATCH 13/20] [MERGE]: Merged display_address() field bzr revid: atp@tinyerp.com-20121002065832-7wick5qjfbbhy5jv --- addons/hr_payroll/report/report_payslip.rml | 2 +- addons/hr_payroll/report/report_payslip_details.rml | 2 +- addons/point_of_sale/report/pos_receipt.rml | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/hr_payroll/report/report_payslip.rml b/addons/hr_payroll/report/report_payslip.rml index 7b419ddc2ee..bbf8716379a 100644 --- a/addons/hr_payroll/report/report_payslip.rml +++ b/addons/hr_payroll/report/report_payslip.rml @@ -197,7 +197,7 @@ - [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street2 or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.zip or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.city or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.state_id and o.employee_id.address_home_id.state_id.name or '' ]] [[o.employee_id.address_home_id and o.employee_id.address_home_id.country_id and o.employee_id.address_home_id.country_id.name or '' ]] + [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]] diff --git a/addons/hr_payroll/report/report_payslip_details.rml b/addons/hr_payroll/report/report_payslip_details.rml index 83e9e5c09a1..7d8575a9fe1 100644 --- a/addons/hr_payroll/report/report_payslip_details.rml +++ b/addons/hr_payroll/report/report_payslip_details.rml @@ -234,7 +234,7 @@ - [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street2 or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.zip or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.city or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.state_id and o.employee_id.address_home_id.state_id.name or '' ]] [[o.employee_id.address_home_id and o.employee_id.address_home_id.country_id and o.employee_id.address_home_id.country_id.name or '' ]] + [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]] diff --git a/addons/point_of_sale/report/pos_receipt.rml b/addons/point_of_sale/report/pos_receipt.rml index 55873887210..484d125ab82 100644 --- a/addons/point_of_sale/report/pos_receipt.rml +++ b/addons/point_of_sale/report/pos_receipt.rml @@ -72,8 +72,7 @@ [[ repeatIn(objects,'o') ]] [[o.user_id.company_id.name]] - [[ address and address.street ]], [[ address and address.zip ]] [[ address and address.city ]] - [[ address and address.country_id.name ]] + [[ address and display_address(address)]] Tel : [[ address and address.phone ]] User : [[ o.user_id.name ]] Shop : [[ o.shop_id.name ]] From c12510e6e41df3d7cca0fd955d24c496f62c2bbf Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Tue, 2 Oct 2012 19:39:05 +0530 Subject: [PATCH 14/20] [IMP]account_check_writing: Remove get_zip_line() and add display_address() function bzr revid: atp@tinyerp.com-20121002140905-jmiudzxe3pqdroha --- .../report/check_print.py | 20 ------------------- .../report/check_print_bottom.rml | 5 +---- .../report/check_print_middle.rml | 5 +---- .../report/check_print_top.rml | 4 +--- 4 files changed, 3 insertions(+), 31 deletions(-) diff --git a/addons/account_check_writing/report/check_print.py b/addons/account_check_writing/report/check_print.py index f8e048beb2d..fd52c96b9aa 100644 --- a/addons/account_check_writing/report/check_print.py +++ b/addons/account_check_writing/report/check_print.py @@ -32,7 +32,6 @@ class report_print_check(report_sxw.rml_parse): 'time': time, 'get_lines': self.get_lines, 'fill_stars' : self.fill_stars, - 'get_zip_line': self.get_zip_line, }) def fill_stars(self, amount): amount = amount.replace('Dollars','') @@ -41,25 +40,6 @@ class report_print_check(report_sxw.rml_parse): return ' '.join([amount,'*'*stars]) else: return amount - - def get_zip_line(self, address): - ''' - Get the address line - ''' - ret = '' - if address: - if address.city: - ret += address.city - if address.state_id: - if address.state_id.name: - if ret: - ret += ', ' - ret += address.state_id.name - if address.zip: - if ret: - ret += ' ' - ret += address.zip - return ret def get_lines(self, voucher_lines): result = [] diff --git a/addons/account_check_writing/report/check_print_bottom.rml b/addons/account_check_writing/report/check_print_bottom.rml index bb499a8aac1..f9add2fe60b 100644 --- a/addons/account_check_writing/report/check_print_bottom.rml +++ b/addons/account_check_writing/report/check_print_bottom.rml @@ -281,10 +281,7 @@ [[ voucher.partner_id.name ]] - [[ voucher.partner_id.street or removeParentNode('para') ]] - [[ voucher.partner_id.street2 or removeParentNode('para') ]] - [[ get_zip_line(voucher.partner_id) ]] - [[ voucher.partner_id.country_id.name]] + [[ display_address(voucher.partner_id) or removeParentNode('para') ]] diff --git a/addons/account_check_writing/report/check_print_middle.rml b/addons/account_check_writing/report/check_print_middle.rml index 5a2f83f20a2..b1fffca662d 100644 --- a/addons/account_check_writing/report/check_print_middle.rml +++ b/addons/account_check_writing/report/check_print_middle.rml @@ -237,10 +237,7 @@ [[ voucher.partner_id.name ]] - [[ voucher.partner_id.street or removeParentNode('para') ]] - [[ voucher.partner_id.street2 or removeParentNode('para') ]] - [[ get_zip_line(voucher.partner_id) ]] - [[ voucher.partner_id.country_id.name]] + [[ display_address(voucher.partner_id) or removeParentNode('para') ]] diff --git a/addons/account_check_writing/report/check_print_top.rml b/addons/account_check_writing/report/check_print_top.rml index 41526605f47..9a4d633e680 100644 --- a/addons/account_check_writing/report/check_print_top.rml +++ b/addons/account_check_writing/report/check_print_top.rml @@ -153,9 +153,7 @@ [[ voucher.partner_id.name ]] - [[ voucher.partner_id.street2 or removeParentNode('para') ]] - [[ get_zip_line(voucher.partner_id) ]] - [[ voucher.partner_id.country_id.name]] + [[ display_address(voucher.partner_id) or removeParentNode('para') ]] From 8d3086df280ffd8bc37981f6e531f6eb80345d04 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Tue, 2 Oct 2012 20:15:47 +0530 Subject: [PATCH 15/20] [IMP]: Use display_address() bzr revid: atp@tinyerp.com-20121002144547-kpbo8wv694qipvm0 --- addons/account_payment/report/order.rml | 6 +----- addons/l10n_fr_hr_payroll/report/fiche_paye.rml | 4 +--- addons/l10n_in_hr_payroll/report/report_payslip_details.rml | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml index 973588e5410..44a9485e6d8 100644 --- a/addons/account_payment/report/order.rml +++ b/addons/account_payment/report/order.rml @@ -159,11 +159,7 @@ [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.name or '']] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street or '']] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street2 or removeParentNode('para')]] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.zip or '']] [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.city or '']] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.state and o.mode.bank_id.bank.state.name or removeParentNode('para') ]] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.country and o.mode.bank_id.bank.country.name or '']] + [[ o.mode and o.mode.bank_id.bank and display_address(o.mode.bank_id.bank)]] diff --git a/addons/l10n_fr_hr_payroll/report/fiche_paye.rml b/addons/l10n_fr_hr_payroll/report/fiche_paye.rml index 5221b00c462..76c6eb9dedf 100644 --- a/addons/l10n_fr_hr_payroll/report/fiche_paye.rml +++ b/addons/l10n_fr_hr_payroll/report/fiche_paye.rml @@ -290,9 +290,7 @@ [[o.employee_id.name or '_']] - [[o.employee_id.address_home_id.street or '_' ]] - [[o.employee_id.address_home_id.street2 or '' ]] - [[o.employee_id.address_home_id.zip or '_' ]] [[o.employee_id.address_home_id.city or '' ]] + [[display_address(o.employee_id.address_home_id) or '_' ]] diff --git a/addons/l10n_in_hr_payroll/report/report_payslip_details.rml b/addons/l10n_in_hr_payroll/report/report_payslip_details.rml index 76bf65c98ac..c4ce55bfa41 100644 --- a/addons/l10n_in_hr_payroll/report/report_payslip_details.rml +++ b/addons/l10n_in_hr_payroll/report/report_payslip_details.rml @@ -234,7 +234,7 @@ - [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.street2 or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.zip or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.city or '' ]],[[o.employee_id.address_home_id and o.employee_id.address_home_id.state_id and o.employee_id.address_home_id.state_id.name or '' ]] [[o.employee_id.address_home_id and o.employee_id.address_home_id.country_id and o.employee_id.address_home_id.country_id.name or '' ]] + [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]] From bdae7c2850398c2c6ca983fcbc6831cc40ffb58e Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Tue, 2 Oct 2012 22:10:01 +0530 Subject: [PATCH 16/20] [IMP]: ADD currency symbol with amount bzr revid: atp@tinyerp.com-20121002164001-s8r2ivug8ghi36af --- addons/account/report/account_print_overdue.rml | 2 +- addons/account_payment/report/order.rml | 14 +++++++++----- addons/account_payment/report/payment_order.py | 6 ------ .../report/all_closed_cashbox_of_the_day.rml | 2 +- addons/point_of_sale/report/pos_details.rml | 4 ++-- addons/point_of_sale/report/pos_payment_report.rml | 2 +- .../report/pos_payment_report_user.rml | 2 +- 7 files changed, 15 insertions(+), 17 deletions(-) diff --git a/addons/account/report/account_print_overdue.rml b/addons/account/report/account_print_overdue.rml index 83d3162cf6d..31f5c25a9b3 100644 --- a/addons/account/report/account_print_overdue.rml +++ b/addons/account/report/account_print_overdue.rml @@ -261,7 +261,7 @@ Balance : - [[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0)), currency_obj = company.currency_id) ]] diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml index 44a9485e6d8..30181f84512 100644 --- a/addons/account_payment/report/order.rml +++ b/addons/account_payment/report/order.rml @@ -159,7 +159,11 @@ [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.name or '']] - [[ o.mode and o.mode.bank_id.bank and display_address(o.mode.bank_id.bank)]] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street or '']] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street2 or removeParentNode('para')]] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.zip or '']] [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.city or '']] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.state and o.mode.bank_id.bank.state.name or removeParentNode('para') ]] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.country and o.mode.bank_id.bank.country.name or '']] @@ -252,10 +256,10 @@ [[line.date=='False' and '-' or formatLang(line.date,date=True) ]] - [[formatLang(line.amount) or '-' ]] [[get_company_currency_symbol()]] + [[formatLang(line.amount, currency_obj= user.company_id and user.company_id.currency_id) or '-' ]] - [[ formatLang(line.amount_currency) ]] [[ line.currency.symbol]] + [[ formatLang(line.amount_currency, currency_obj= line.currency)]] @@ -271,10 +275,10 @@ Total: - [[ formatLang(get_amount_total(o)) or '' ]] [[get_company_currency_symbol()]] + [[ formatLang(get_amount_total(o), currency_obj= user.company_id and user.company_id.currency_id) or '' ]] - [[ formatLang(get_amount_total_in_currency(o)) or '' ]] [[get_company_currency_symbol()]] + [[ formatLang(get_amount_total_in_currency(o), currency_obj= user.company_id and user.company_id.currency_id) or '' ]] diff --git a/addons/account_payment/report/payment_order.py b/addons/account_payment/report/payment_order.py index 0b2a8061906..0a87d281471 100644 --- a/addons/account_payment/report/payment_order.py +++ b/addons/account_payment/report/payment_order.py @@ -32,7 +32,6 @@ class payment_order(report_sxw.rml_parse): 'time': time, 'get_invoice_name': self._get_invoice_name, 'get_company_currency': self._get_company_currency, - 'get_company_currency_symbol': self._get_company_currency_symbol, 'get_amount_total_in_currency': self._get_amount_total_in_currency, 'get_amount_total': self._get_amount_total, 'get_account_name': self._get_account_name, @@ -72,11 +71,6 @@ class payment_order(report_sxw.rml_parse): user = pool.get('res.users').browse(self.cr, self.uid, self.uid) return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False - def _get_company_currency_symbol(self): - pool = pooler.get_pool(self.cr.dbname) - user = pool.get('res.users').browse(self.cr, self.uid, self.uid) - return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False - def _get_account_name(self,bank_id): if bank_id: pool = pooler.get_pool(self.cr.dbname) diff --git a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml index 4b7088cb86f..30ef8242a85 100644 --- a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml +++ b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml @@ -210,7 +210,7 @@ [[ (get_bal(statement)) or '0.00' ]] [[company.currency_id.symbol]] - [[ formatLang(get_sub_total(user,statement['journal_id'],statement['date'])) ]] [[company.currency_id.symbol]] + [[ formatLang(get_sub_total(user,statement['journal_id'],statement['date']), currency_obj = company.currency_id )]] diff --git a/addons/point_of_sale/report/pos_details.rml b/addons/point_of_sale/report/pos_details.rml index aeecc82f7ef..e7c4c756e64 100644 --- a/addons/point_of_sale/report/pos_details.rml +++ b/addons/point_of_sale/report/pos_details.rml @@ -289,7 +289,7 @@ [[ p['name'] or removeParentNode('para') ]] - [[ formatLang(p['amount']) or removeParentNode('tr') ]] [[ company.currency_id.symbol ]] + [[ formatLang(p['amount'], currency_obj = company.currency_id) or removeParentNode('tr') ]] @@ -320,7 +320,7 @@ [[ p['name'] or removeParentNode('para') ]] - [[ formatLang(p['sum'], dp='Account') or removeParentNode('tr') ]] [[ company.currency_id.symbol ]] + [[ formatLang(p['sum'], dp='Account', currency_obj = company.currency_id) or removeParentNode('tr') ]] diff --git a/addons/point_of_sale/report/pos_payment_report.rml b/addons/point_of_sale/report/pos_payment_report.rml index 1e43b44cf05..bcc4b9ec261 100644 --- a/addons/point_of_sale/report/pos_payment_report.rml +++ b/addons/point_of_sale/report/pos_payment_report.rml @@ -201,7 +201,7 @@ Net Total: - [[ formatLang(pos_payment_total(o)) or removeParentNode('blockTable')]] [[ company.currency_id.symbol ]] + [[ formatLang(pos_payment_total(o), currency_obj = company.currency_id) or removeParentNode('blockTable')]] diff --git a/addons/point_of_sale/report/pos_payment_report_user.rml b/addons/point_of_sale/report/pos_payment_report_user.rml index f945890d984..1d89d28c5f9 100644 --- a/addons/point_of_sale/report/pos_payment_report_user.rml +++ b/addons/point_of_sale/report/pos_payment_report_user.rml @@ -194,7 +194,7 @@ Total: - [[ formatLang(pos_payment_user_total(data['form'])) or removeParentNode('blockTable')]] [[company.currency_id.symbol]] + [[ formatLang(pos_payment_user_total(data['form'], currency_obj = company.currency_id)) or removeParentNode('blockTable')]] From 3d6520b3ff06385d28fc4f4e3cb8beef4237276e Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 3 Oct 2012 11:33:46 +0530 Subject: [PATCH 17/20] [FIX]hr_payroll: Fix if address is not defined. bzr revid: atp@tinyerp.com-20121003060346-tdakbm44iumvynw8 --- addons/hr_payroll/report/report_payslip.rml | 3 ++- addons/hr_payroll/report/report_payslip_details.rml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/hr_payroll/report/report_payslip.rml b/addons/hr_payroll/report/report_payslip.rml index bbf8716379a..990419ee5f1 100644 --- a/addons/hr_payroll/report/report_payslip.rml +++ b/addons/hr_payroll/report/report_payslip.rml @@ -197,7 +197,8 @@ - [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]] + [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]] + [[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]] diff --git a/addons/hr_payroll/report/report_payslip_details.rml b/addons/hr_payroll/report/report_payslip_details.rml index 7d8575a9fe1..4ace0ad2f82 100644 --- a/addons/hr_payroll/report/report_payslip_details.rml +++ b/addons/hr_payroll/report/report_payslip_details.rml @@ -234,7 +234,8 @@ - [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]] + [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]] + [[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]] From 9b01d91679d45ab334fc2acb5379bc7042990b4b Mon Sep 17 00:00:00 2001 From: "pankita shah (Open ERP)" Date: Wed, 3 Oct 2012 12:44:21 +0530 Subject: [PATCH 18/20] [IMP] currency in l10_in_hr_payroll bzr revid: shp@tinyerp.com-20121003071421-c5kd08mhiumoh6fv --- .../report_hr_salary_employee_bymonth.rml | 26 +++++++++---------- .../report/report_hr_yearly_salary_detail.rml | 4 +-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml index 0c0353a4045..6368a644f4b 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml +++ b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml @@ -234,7 +234,7 @@ - [[ formatLang(e[13]) ]] [[company.currency_id.symbol]] + [[ formatLang(e[13],currency_obj= company.currency_id)]] @@ -248,40 +248,40 @@ Total - [[ formatLang(t[1]) or removeParentNode('para') ]] [[company.currency_id.symbol]] + [[ formatLang(t[1],currency_obj= company.currency_id) or removeParentNode('para') ]] - [[ formatLang(t[2]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[2],currency_obj= company.currency_id) or removeParentNode('para')]] - [[ formatLang(t[3]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[3],currency_obj= company.currency_id) or removeParentNode('para')]] - [[ formatLang(t[4]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[4],currency_obj= company.currency_id) or removeParentNode('para')]] - [[ formatLang(t[5]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[5],currency_obj= company.currency_id) or removeParentNode('para')]] - [[ formatLang(t[6]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[6],currency_obj= company.currency_id) or removeParentNode('para')]] - [[ formatLang(t[7]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[7],currency_obj= company.currency_id) or removeParentNode('para')]] ] - [[ formatLang(t[8]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[8],currency_obj= company.currency_id) or removeParentNode('para')]] - [[ formatLang(t[9]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[9],currency_obj= company.currency_id) or removeParentNode('para')]] - [[ formatLang(t[10]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[10],currency_obj= company.currency_id) or removeParentNode('para')]] - [[ formatLang(t[11]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[11],currency_obj= company.currency_id) or removeParentNode('para')]] - [[ formatLang(t[12]) or removeParentNode('para')]] [[company.currency_id.symbol]] + [[ formatLang(t[12],currency_obj= company.currency_id) or removeParentNode('para')]] [[ formatLang(get_total(), currency_obj = company.currency_id)]] diff --git a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml index 7fa127b0bd3..502eaa7b0ff 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml +++ b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml @@ -478,7 +478,7 @@ - [[ formatLang(e1[13]) ]] [[ company.currency_id.symbol ]] + [[ formatLang(e1[13],currency_obj= company.currency_id) ]] @@ -571,7 +571,7 @@ - [[ formatLang(e2[13]) ]] [[ company.currency_id.symbol ]] + [[ formatLang(e2[13],currency_obj= company.currency_id) ]] From b5c7b1403ef8640f384ed7540101786dd2df6b32 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Mon, 8 Oct 2012 23:24:58 +0530 Subject: [PATCH 19/20] [IMP]: Change address using display_address() in follow-up report and overdue report. bzr revid: atp@tinyerp.com-20121008175458-1vqh34vuyw1zimkq --- .../account/report/account_print_overdue.py | 23 ------------------- .../account/report/account_print_overdue.rml | 7 +----- .../report/account_followup_print.py | 6 ----- .../report/account_followup_print.rml | 7 +----- 4 files changed, 2 insertions(+), 41 deletions(-) diff --git a/addons/account/report/account_print_overdue.py b/addons/account/report/account_print_overdue.py index 1b617e9afa4..4ddedc102f5 100644 --- a/addons/account/report/account_print_overdue.py +++ b/addons/account/report/account_print_overdue.py @@ -29,34 +29,11 @@ class Overdue(report_sxw.rml_parse): super(Overdue, self).__init__(cr, uid, name, context=context) self.localcontext.update( { 'time': time, - 'adr_get': self._adr_get, 'getLines': self._lines_get, 'tel_get': self._tel_get, 'message': self._message, }) self.context = context - def _adr_get(self, partner, type): - res = [] - res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') - addresses = res_partner.address_get(self.cr, self.uid, [partner.id], [type]) - adr_id = addresses and addresses[type] or False - result = { - 'name': False, - 'street': False, - 'street2': False, - 'city': False, - 'zip': False, - 'state_id':False, - 'country_id': False, - } - if adr_id: - result = res_partner.read(self.cr, self.uid, [adr_id], context=self.context.copy()) - result[0]['country_id'] = result[0]['country_id'] and result[0]['country_id'][1] or False - result[0]['state_id'] = result[0]['state_id'] and result[0]['state_id'][1] or False - return result - - res.append(result) - return res def _tel_get(self,partner): if not partner: diff --git a/addons/account/report/account_print_overdue.rml b/addons/account/report/account_print_overdue.rml index 31f5c25a9b3..34f026d26b5 100644 --- a/addons/account/report/account_print_overdue.rml +++ b/addons/account/report/account_print_overdue.rml @@ -126,15 +126,10 @@ - [[ repeatIn(adr_get(o, 'invoice'),'addr') ]] [[ o.title.name or '' ]] [[ o.name ]] - [[ addr['street'] ]] - [[ addr['street2'] or removeParentNode('para') ]] - [[ addr['zip'] ]] [[ addr['city'] ]] - [[ addr['state_id'] or removeParentNode('para')]] - [[ addr['country_id'] ]] + [[ display_address(o.partner_id)] ]] diff --git a/addons/account_followup/report/account_followup_print.py b/addons/account_followup/report/account_followup_print.py index 8d64ce30f6b..593430691aa 100644 --- a/addons/account_followup/report/account_followup_print.py +++ b/addons/account_followup/report/account_followup_print.py @@ -30,7 +30,6 @@ class report_rappel(report_sxw.rml_parse): self.localcontext.update({ 'time': time, 'ids_to_objects': self._ids_to_objects, - 'adr_get': self._adr_get, 'getLines': self._lines_get, 'get_text': self._get_text }) @@ -43,11 +42,6 @@ class report_rappel(report_sxw.rml_parse): all_lines.append(line) return all_lines - def _adr_get(self, stat_line, type): - res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') - adr = res_partner.address_get(self.cr, self.uid, [stat_line.partner_id.id], [type])[type] - return adr and res_partner.read(self.cr, self.uid, [adr]) or [{}] - def _lines_get(self, stat_by_partner_line): pool = pooler.get_pool(self.cr.dbname) moveline_obj = pool.get('account.move.line') diff --git a/addons/account_followup/report/account_followup_print.rml b/addons/account_followup/report/account_followup_print.rml index 3d096ecf3ac..7f2242991de 100644 --- a/addons/account_followup/report/account_followup_print.rml +++ b/addons/account_followup/report/account_followup_print.rml @@ -129,15 +129,10 @@ - [[ repeatIn(adr_get(o,'invoice'),'a' )]] [[ o.partner_id.name or '' ]] - [[ a['street'] or '']] - [[ a['street2'] or removeParentNode('para') ]] - [[ a['zip'] or '' ]] [[ a['city'] or '' ]] - [[( a['state_id'] and a['state_id'][1]) or removeParentNode('para') ]] - [[( a['country_id'] and a['country_id'][1]) or '']] + [[ display_address(o.partner_id) or '']] From bc44da05a1dc1b1d1f4233ad8835ded02ddf1fe9 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 11 Oct 2012 11:40:02 +0200 Subject: [PATCH 20/20] [IMP] reports: use of FormatLang(amount, currency_obj=...) instead of printing currency.symbol directly in the report bzr revid: qdp-launchpad@openerp.com-20121011094002-7unxi6bi2hh2u6k5 --- addons/account/report/account_print_overdue.rml | 2 +- addons/account_payment/report/order.rml | 6 +++--- .../account_voucher/report/account_voucher_print.rml | 4 ++-- addons/l10n_be/wizard/l10n_be_vat_intra_print.rml | 4 ++-- .../report/all_closed_cashbox_of_the_day.py | 2 +- .../report/all_closed_cashbox_of_the_day.rml | 2 +- addons/point_of_sale/report/pos_details_summary.rml | 12 ++++++------ addons/point_of_sale/report/pos_receipt.rml | 8 ++++---- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/addons/account/report/account_print_overdue.rml b/addons/account/report/account_print_overdue.rml index 34f026d26b5..577cb9142a2 100644 --- a/addons/account/report/account_print_overdue.rml +++ b/addons/account/report/account_print_overdue.rml @@ -236,7 +236,7 @@ [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] - [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0)), currency_obj=company.currency_id) ]] diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml index 30181f84512..7ad897890e4 100644 --- a/addons/account_payment/report/order.rml +++ b/addons/account_payment/report/order.rml @@ -256,7 +256,7 @@ [[line.date=='False' and '-' or formatLang(line.date,date=True) ]] - [[formatLang(line.amount, currency_obj= user.company_id and user.company_id.currency_id) or '-' ]] + [[formatLang(line.amount, currency_obj= user.company_id.currency_id) or '-' ]] [[ formatLang(line.amount_currency, currency_obj= line.currency)]] @@ -275,10 +275,10 @@ Total: - [[ formatLang(get_amount_total(o), currency_obj= user.company_id and user.company_id.currency_id) or '' ]] + [[ formatLang(get_amount_total(o), currency_obj= user.company_id.currency_id) or '' ]] - [[ formatLang(get_amount_total_in_currency(o), currency_obj= user.company_id and user.company_id.currency_id) or '' ]] + [[ formatLang(get_amount_total_in_currency(o), currency_obj= user.company_id.currency_id) or '' ]] diff --git a/addons/account_voucher/report/account_voucher_print.rml b/addons/account_voucher/report/account_voucher_print.rml index 923e900887a..9f0f2e1f07e 100644 --- a/addons/account_voucher/report/account_voucher_print.rml +++ b/addons/account_voucher/report/account_voucher_print.rml @@ -219,7 +219,7 @@ [[ p['pname'] ]] - [[ p['amount'] ]] [[ voucher.currency_id.symbol ]] + [[ formatLang(p['amount'], currency_obj=voucher.currency_id) ]] @@ -323,7 +323,7 @@ - [[ voucher.amount ]] [[ voucher.currency_id.symbol ]] + [[ formatLang(voucher.amount, currency_obj=voucher.currency_id) ]] diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra_print.rml b/addons/l10n_be/wizard/l10n_be_vat_intra_print.rml index 415f3a08f1f..ff1a2c2064d 100644 --- a/addons/l10n_be/wizard/l10n_be_vat_intra_print.rml +++ b/addons/l10n_be/wizard/l10n_be_vat_intra_print.rml @@ -108,7 +108,7 @@ [[ l['code'] (l['intra_code']) ]] - [[ l['amount'] or O.OO ]] [[ company.currency_id.symbol ]] + [[ formatLang(l['amount'], currency_obj=company.currency_id) ]] @@ -129,7 +129,7 @@ Total: - [[ data['form']['amountsum'] or 0.00 ]] [[ company.currency_id.symbol ]] + [[ formatLang(data['form']['amountsum'], currency_obj=company.currency_id) ]] diff --git a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.py b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.py index 0e75e7f7ae1..dc3b432728f 100644 --- a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.py +++ b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.py @@ -73,7 +73,7 @@ class all_closed_cashbox_of_the_day(report_sxw.rml_parse): if res: return res[0]['bal'] else: - return False + return 0 def _get_sub_total(self, user, data, date): res={} diff --git a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml index 30ef8242a85..4f16031c8b3 100644 --- a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml +++ b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.rml @@ -207,7 +207,7 @@ [[ statement['closing_date'] ]] - [[ (get_bal(statement)) or '0.00' ]] [[company.currency_id.symbol]] + [[ formatLang(get_bal(statement), currency_obj = company.currency_id)]] [[ formatLang(get_sub_total(user,statement['journal_id'],statement['date']), currency_obj = company.currency_id )]] diff --git a/addons/point_of_sale/report/pos_details_summary.rml b/addons/point_of_sale/report/pos_details_summary.rml index d12cdec2598..b1c71db7d40 100644 --- a/addons/point_of_sale/report/pos_details_summary.rml +++ b/addons/point_of_sale/report/pos_details_summary.rml @@ -204,7 +204,7 @@ [[ p[0] ]] - [[ p[1] ]] [[company.currency_id.symbol]] + [[ formatLang(p[1], currency_obj=company.currency_id) ]] @@ -235,7 +235,7 @@ [[ t[0] ]] - [[ '%.2f' % (t[1],) ]] [[company.currency_id.symbol]] + [[ formatLang(t[1], currency_obj=company.currency_id) ]] @@ -280,7 +280,7 @@ Total invoiced - [[ '%.2f' % getsuminvoice(objects) ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsuminvoice(objects), currency_obj=company.currency_id) ]] @@ -288,7 +288,7 @@ Total discount - [[ '%.2f' % getsumdisc(objects) ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsumdisc(objects), currency_obj=company.currency_id) ]] @@ -296,7 +296,7 @@ Total paid - [[ '%.2f' % getpaidtotal(objects) ]] [[ company.currency_id.symbol ]] + [[ formatLang(getpaidtotal(objects), currency_obj=company.currency_id) ]] @@ -304,7 +304,7 @@ Total of the day - [[ '%.2f' % gettotalofthaday(objects) ]] [[ company.currency_id.symbol ]] + [[ formatLang(gettotalofthaday(objects), currency_obj=company.currency_id) ]] diff --git a/addons/point_of_sale/report/pos_receipt.rml b/addons/point_of_sale/report/pos_receipt.rml index 484d125ab82..d7b8b08ad29 100644 --- a/addons/point_of_sale/report/pos_receipt.rml +++ b/addons/point_of_sale/report/pos_receipt.rml @@ -108,7 +108,7 @@ [[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]] - [[o.state=='cancel' and o.statement_ids and '-' or '']][[ '%.2f' % net(line.id) ]] [[company.currency_id.symbol]] [[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ '%.2f' % line.discount ]]%) [[company.currency_id.symbol]] + [[o.state=='cancel' and o.statement_ids and '-' or '']][[ formatLang(net(line.id), currency_obj=company.currency_id) ]] [[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ formatLang(line.discount, currency_obj=company.currency_id) ]]) @@ -118,7 +118,7 @@ Taxes : - [[o.state=='cancel' and o.statement_ids and '-' or '']][['%.2f' % o.amount_tax]] [[company.currency_id.symbol]] + [[o.state=='cancel' and o.statement_ids and '-' or '']][[formatLang(o.amount_tax, currency_obj=company.currency_id)]] @@ -128,7 +128,7 @@ Total : - [[o.state=='cancel' and o.statement_ids and '-' or '']][['%.2f' % o.amount_total]] [[company.currency_id.symbol]] + [[o.state=='cancel' and o.statement_ids and '-' or '']][[formatLang(o.amount_total, currency_obj=company.currency_id)]] @@ -157,7 +157,7 @@ - [[ '%.2f' %(d['amt'] or 0) ]] [[company.currency_id.symbol]] + [[ formatLang(d['amt'] or 0, currency_obj=company.currency_id) ]]