From e77abb81fe3af1bad710a199b5aeb4b684754518 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 10 Nov 2011 16:46:14 +0100 Subject: [PATCH 001/143] [IMP] Use babel's locale-aware date formatting when formatting dates in read_group titles bzr revid: xmo@openerp.com-20111110154614-ok0i1w11xvace41y --- openerp/osv/orm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index a89074d322d..a93f4f4a620 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -54,6 +54,8 @@ import time import traceback import types import warnings + +import babel.dates from lxml import etree import fields @@ -2471,7 +2473,9 @@ class BaseModel(object): dt = datetime.datetime.strptime(alldata[d['id']][groupby][:7], '%Y-%m') days = calendar.monthrange(dt.year, dt.month)[1] - d[groupby] = datetime.datetime.strptime(d[groupby][:10], '%Y-%m-%d').strftime('%B %Y') + date_value = datetime.datetime.strptime(d[groupby][:10], '%Y-%m-%d') + d[groupby] = babel.dates.format_date( + date_value, format='MMMM yyyy', locale=context.get('lang', 'en_US')) d['__domain'] = [(groupby, '>=', alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-01', '%Y-%m-%d').strftime('%Y-%m-%d') or False),\ (groupby, '<=', alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-' + str(days), '%Y-%m-%d').strftime('%Y-%m-%d') or False)] + domain del alldata[d['id']][groupby] From 0159340e87b8b15489f838b7b6c5d07fe5a96891 Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 28 Sep 2012 17:07:12 +0530 Subject: [PATCH 002/143] [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 003/143] [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 004/143] [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 005/143] [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 007/143] [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 008/143] [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 009/143] [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 010/143] 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 011/143] [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 012/143] [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 014/143] [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 015/143] [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 016/143] [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 017/143] [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 b0cdfa4eda02da600850d5e1dca4d3c4e3fddce9 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Wed, 3 Oct 2012 11:24:28 +0530 Subject: [PATCH 018/143] [FIX]point_of_sale:string improved in user view. bzr revid: kbh@tinyerp.com-20121003055428-oc6r5t4fpmdb29tj --- addons/point_of_sale/res_users_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/res_users_view.xml b/addons/point_of_sale/res_users_view.xml index 2a510b1d575..89daeaa29a1 100644 --- a/addons/point_of_sale/res_users_view.xml +++ b/addons/point_of_sale/res_users_view.xml @@ -19,7 +19,7 @@ - + From 3d6520b3ff06385d28fc4f4e3cb8beef4237276e Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 3 Oct 2012 11:33:46 +0530 Subject: [PATCH 019/143] [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 bddbfbed46815ac8277403aa9bc70edc6371483f Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 3 Oct 2012 12:29:32 +0530 Subject: [PATCH 020/143] [IMP]in form view of sale order line can not onchange description of product and rename the shipping address field to delivery address bzr revid: sgo@tinyerp.com-20121003065932-de6910lbotic6fh8 --- addons/sale/sale.py | 2 +- addons/sale_stock/sale_stock_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index c47bf1357c8..6c73f4513a3 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -184,7 +184,7 @@ class sale_order(osv.osv): 'user_id': fields.many2one('res.users', 'Salesperson', states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, select=True), 'partner_id': fields.many2one('res.partner', 'Customer', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, required=True, change_default=True, select=True), 'partner_invoice_id': fields.many2one('res.partner', 'Invoice Address', readonly=True, required=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Invoice address for current sales order."), - 'partner_shipping_id': fields.many2one('res.partner', 'Shipping Address', readonly=True, required=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Shipping address for current sales order."), + 'partner_shipping_id': fields.many2one('res.partner', 'Delivery Address', readonly=True, required=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Shipping address for current sales order."), 'order_policy': fields.selection([ ('manual', 'On Demand'), ], 'Create Invoice', required=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, diff --git a/addons/sale_stock/sale_stock_view.xml b/addons/sale_stock/sale_stock_view.xml index 7efb2849a52..4d798b74855 100644 --- a/addons/sale_stock/sale_stock_view.xml +++ b/addons/sale_stock/sale_stock_view.xml @@ -55,7 +55,7 @@ + on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, product_packaging, parent.fiscal_position, False, context)"/> Date: Wed, 3 Oct 2012 12:44:21 +0530 Subject: [PATCH 021/143] [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 defc34894281d50f1a6e3fa4182c2379f3836dca Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 3 Oct 2012 13:02:06 +0530 Subject: [PATCH 022/143] [IMP]add many2many kanban for configuration sales team bzr revid: sgo@tinyerp.com-20121003073206-m0u5u1rhanrs7dne --- addons/crm/crm_view.xml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml index 1da78e50843..ba46cc023ab 100644 --- a/addons/crm/crm_view.xml +++ b/addons/crm/crm_view.xml @@ -105,7 +105,23 @@ - + + + + + +
+ X +
+
+ +
+
+
+
+
+
+
From b3851462113fba9aaf85f0872bd5b5f67aef1a15 Mon Sep 17 00:00:00 2001 From: "Randhir Mayatra (OpenERP)" Date: Wed, 3 Oct 2012 14:32:51 +0530 Subject: [PATCH 023/143] [IMP] improve the event view bzr revid: rma@tinyerp.com-20121003090251-hxypbmey10ucb1mu --- addons/event/event_view.xml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index 6ad8fb20467..22da0ca5596 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -116,10 +116,9 @@