[IMP] account: good default value for some accounting reports

bzr revid: qdp-launchpad@openerp.com-20110608100427-l3q2epim235cgg14
This commit is contained in:
Quentin (OpenERP) 2011-06-08 12:04:27 +02:00
parent 154addd6bb
commit b0022af2c7
13 changed files with 19 additions and 19 deletions

View File

@ -88,10 +88,10 @@ class account_balance(report_sxw.rml_parse, common_report_header):
}
self.sum_debit += account_rec['debit']
self.sum_credit += account_rec['credit']
if disp_acc == 'bal_movement':
if disp_acc == 'movement':
if not currency_obj.is_zero(self.cr, self.uid, currency, res['credit']) or not currency_obj.is_zero(self.cr, self.uid, currency, res['debit']) or not currency_obj.is_zero(self.cr, self.uid, currency, res['balance']):
self.result_acc.append(res)
elif disp_acc == 'bal_solde':
elif disp_acc == 'not_zero':
if not currency_obj.is_zero(self.cr, self.uid, currency, res['balance']):
self.result_acc.append(res)
else:

View File

@ -233,7 +233,7 @@
<td>
<para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td> <para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
<blockTable colWidths="60.0,60.0" style="Table5">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
<tr>

View File

@ -143,10 +143,10 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
self.result_sum_dr += account.balance
if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_cr += account.balance
if data['form']['display_account'] == 'bal_movement':
if data['form']['display_account'] == 'movement':
if not currency_pool.is_zero(self.cr, self.uid, currency, account.credit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.debit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.balance):
accounts_temp.append(account_dict)
elif data['form']['display_account'] == 'bal_solde':
elif data['form']['display_account'] == 'not_zero':
if not currency_pool.is_zero(self.cr, self.uid, currency, account.balance):
accounts_temp.append(account_dict)
else:

View File

@ -174,7 +174,7 @@
</tr>
</blockTable>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ get_target_move(data) ]] </para></td>
</tr>
</blockTable>

View File

@ -163,7 +163,7 @@
</tr>
</blockTable>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ get_target_move(data) ]]</para></td>
</tr>
</blockTable>

View File

@ -117,10 +117,10 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
num_entry = self.cr.fetchone()[0] or 0
sold_account = self._sum_balance_account(child_account)
self.sold_accounts[child_account.id] = sold_account
if self.display_account == 'bal_movement':
if self.display_account == 'movement':
if child_account.type != 'view' and num_entry <> 0:
res.append(child_account)
elif self.display_account == 'bal_solde':
elif self.display_account == 'not_zero':
if child_account.type != 'view' and num_entry <> 0:
if not currency_obj.is_zero(self.cr, self.uid, currency, sold_account):
res.append(child_account)

View File

@ -395,7 +395,7 @@
<para style="terp_default_Centre_7">[[', '.join([ lt or '' for lt in get_journal(data) ]) ]]</para>
</td>
<td>
<para style="terp_default_Centre_7">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para>
<para style="terp_default_Centre_7">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para>
</td>
<td>
<para style="terp_default_Centre_7">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]]</para>

View File

@ -180,7 +180,7 @@
</tr>
</blockTable>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ get_target_move(data) ]]</para></td>
</tr>
</blockTable>

View File

@ -113,10 +113,10 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
self.result_sum_dr += account.debit - account.credit
if typ == 'income' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_cr += account.credit - account.debit
if data['form']['display_account'] == 'bal_movement':
if data['form']['display_account'] == 'movement':
if not currency_pool.is_zero(self.cr, self.uid, currency, account.credit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.debit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.balance):
accounts_temp.append(account)
elif data['form']['display_account'] == 'bal_solde':
elif data['form']['display_account'] == 'not_zero':
if not currency_pool.is_zero(self.cr, self.uid, currency, account.balance):
accounts_temp.append(account)
else:

View File

@ -184,7 +184,7 @@
</tr>
</blockTable>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ get_target_move(data) ]] </para></td>
</tr>
</blockTable>

View File

@ -48,7 +48,7 @@ class account_bs_report(osv.osv_memory):
}
_defaults={
'display_type': True,
'display_type': False,
'journal_ids': [],
'reserve_account_id': _get_def_reserve_account,
}

View File

@ -26,13 +26,13 @@ class account_common_account_report(osv.osv_memory):
_description = 'Account Common Account Report'
_inherit = "account.common.report"
_columns = {
'display_account': fields.selection([('bal_all','All'), ('bal_movement','With movements'),
('bal_solde','With balance is not equal to 0'),
'display_account': fields.selection([('all','All'), ('movement','With movements'),
('not_zero','With balance is not equal to 0'),
],'Display Accounts', required=True),
}
_defaults = {
'display_account': 'bal_all',
'display_account': 'movement',
}
def pre_print_report(self, cr, uid, ids, data, context=None):

View File

@ -33,7 +33,7 @@ class account_pl_report(osv.osv_memory):
}
_defaults = {
'display_type': True,
'display_type': False,
'journal_ids': [],
'target_move': False
}