[IMP]: In report 'Print Salary Structure' put currency symbol for appropriate amount type.

bzr revid: rch_open_erp-20100916050208-cazwngr05kk0easc
This commit is contained in:
rch (Open ERP) 2010-09-16 10:32:08 +05:30
parent e211e9416b
commit 95e87db51d
2 changed files with 7 additions and 2 deletions

View File

@ -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'

View File

@ -441,7 +441,7 @@
<para style="terp_default_9">[[ get_line_amount_type(line.amount_type) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line.amount) or '']][[ employee.company_id.currency_id.symbol]]</para>
<para style="terp_default_Right_9">[[ formatLang(line.amount) or '']][[ get_line_amount_symbol(line.amount_type) ]]</para>
</td>
<td>
<para style="terp_default_9">[[ get_line_type(line.type) ]]</para>