From 95e87db51d6fa35365fe69f09b46604af30f044a Mon Sep 17 00:00:00 2001 From: "rch (Open ERP)" <> Date: Thu, 16 Sep 2010 10:32:08 +0530 Subject: [PATCH] [IMP]: In report 'Print Salary Structure' put currency symbol for appropriate amount type. bzr revid: rch_open_erp-20100916050208-cazwngr05kk0easc --- addons/hr_payroll/report/report_emp_salary_structure.py | 7 ++++++- addons/hr_payroll/report/report_emp_salary_structure.rml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/hr_payroll/report/report_emp_salary_structure.py b/addons/hr_payroll/report/report_emp_salary_structure.py index 0c63f446c38..d4365a8423b 100644 --- a/addons/hr_payroll/report/report_emp_salary_structure.py +++ b/addons/hr_payroll/report/report_emp_salary_structure.py @@ -36,7 +36,8 @@ class salary_structure_report(report_sxw.rml_parse): 'get_type':self.get_type, 'get_contract':self.get_contract, 'get_line_amount_type':self.get_line_amount_type, - 'get_line_type':self.get_line_type + 'get_line_type':self.get_line_type, + 'get_line_amount_symbol':self.get_line_amount_symbol }) def get_contract(self,emp): @@ -69,6 +70,10 @@ class salary_structure_report(report_sxw.rml_parse): else: return 'Fixed' + def get_line_amount_symbol(self,amount_type): + if amount_type != 'per': + return self.pool.get('res.users').browse(self.cr, self.uid,self.uid).company_id.currency_id.symbol + def get_line_type(self,type): if type == 'allounce': return 'Allowance' diff --git a/addons/hr_payroll/report/report_emp_salary_structure.rml b/addons/hr_payroll/report/report_emp_salary_structure.rml index 11bfee609f0..ee564052af3 100644 --- a/addons/hr_payroll/report/report_emp_salary_structure.rml +++ b/addons/hr_payroll/report/report_emp_salary_structure.rml @@ -441,7 +441,7 @@ [[ get_line_amount_type(line.amount_type) ]] - [[ formatLang(line.amount) or '']][[ employee.company_id.currency_id.symbol]] + [[ formatLang(line.amount) or '']][[ get_line_amount_symbol(line.amount_type) ]] [[ get_line_type(line.type) ]]