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,
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...)
<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>
<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">