[FIX]:the traslation issue for the balance sheet and profit loss report

bzr revid: ksa@tinyerp.com-20130405102755-6hir5spwvsu92r6l
This commit is contained in:
kirti savalia (OpenERP) 2013-04-05 15:57:55 +05:30
parent 51421af4a7
commit 9e52f38ba7
2 changed files with 7 additions and 6 deletions

View File

@ -53,7 +53,8 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
account_obj = self.pool.get('account.account')
currency_obj = self.pool.get('res.currency')
ids2 = self.pool.get('account.financial.report')._get_children_by_order(self.cr, self.uid, [data['form']['account_report_id'][0]], context=data['form']['used_context'])
for report in self.pool.get('account.financial.report').browse(self.cr, self.uid, ids2, context=data['form']['used_context']):
new_context = dict(data['form']['used_context'], lang=self.context.get('lang', 'en_US'))
for report in self.pool.get('account.financial.report').browse(self.cr, self.uid, ids2, context=new_context):
vals = {
'name': report.name,
'balance': report.balance * report.sign or 0.0,
@ -76,7 +77,7 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
elif report.type == 'account_type' and report.account_type_ids:
account_ids = account_obj.search(self.cr, self.uid, [('user_type','in', [x.id for x in report.account_type_ids])])
if account_ids:
for account in account_obj.browse(self.cr, self.uid, account_ids, context=data['form']['used_context']):
for account in account_obj.browse(self.cr, self.uid, account_ids, context=new_context):
#if there are accounts to display, we add them to the lines with a level equals to their level in
#the COA + 1 (to avoid having them with a too low level that would conflicts with the level of data
#financial reports for Assets, liabilities...)

View File

@ -170,13 +170,13 @@
<tr>
<td><para style="terp_tblheader_General_Centre">Chart of Accounts</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filters' and get_filter(data) ]]</para></td>
<td><para style="terp_tblheader_General_Centre">Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]]</para></td>
</tr>
<tr>
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filters' and get_filter(data) or removeParentNode('para') ]] </para>
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
<td><para style="terp_default_Centre_8">[[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] </para>
<blockTable colWidths="80.0,80.0" style="Table3">[[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_tblheader_General_Centre">Start Date</para></td>
<td><para style="terp_tblheader_General_Centre">End Date</para></td>
@ -196,7 +196,7 @@
<td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
</tr>
</blockTable>
</td>
</td>
</tr>
</blockTable>
<para style="Standard">