[MERGE] Account: Report general ledger => with is_zero method instead of direct comparision for bal_solde
bzr revid: mra@mra-laptop-20110104072629-8pm3wqqncd1iawi2
This commit is contained in:
@@ -103,7 +103,9 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
|
||||
|
||||
def get_children_accounts(self, account):
|
||||
res = []
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
ids_acc = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, account.id)
|
||||
currency = account.currency_id and account.currency_id or account.company_id.currency_id
|
||||
for child_account in self.pool.get('account.account').browse(self.cr, self.uid, ids_acc, context=self.context):
|
||||
sql = """
|
||||
SELECT count(id)
|
||||
@@ -119,7 +121,7 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
|
||||
res.append(child_account)
|
||||
elif self.display_account == 'bal_solde':
|
||||
if child_account.type != 'view' and num_entry <> 0:
|
||||
if ( sold_account <> 0.0):
|
||||
if currency_obj.is_zero(self.cr, self.uid, currency, sold_account) != 0:
|
||||
res.append(child_account)
|
||||
else:
|
||||
res.append(child_account)
|
||||
|
||||
Reference in New Issue
Block a user