[FIX]account: general ledger

lp bug: https://launchpad.net/bugs/656378 fixed

bzr revid: ara@tinyerp.com-20110104055112-wnqayojs4db8igmr
This commit is contained in:
ARA (OpenERP)
2011-01-04 11:21:12 +05:30
parent f97bd923d0
commit aa44246fe4
@@ -104,6 +104,8 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
def get_children_accounts(self, account):
res = []
ids_acc = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, account.id)
currency_obj = self.pool.get('res.currency')
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)