~julius-network-solutions/openobject-addons/trunk-bug-wiki-image

« back to all changes in this revision

Viewing changes to account/report/account_general_ledger.py

  • Committer: qdp-launchpad at tinyerp
  • Date: 2011-01-14 00:11:01 UTC
  • mfrom: (3164.118.723 dev-3addons)
  • Revision ID: qdp-launchpad@tinyerp.com-20110114001101-wk77opsrvslh7pak
Tags: openerp-buildfail-1-5165
[MERGE] merged the dev3 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
 
104
104
    def get_children_accounts(self, account):
105
105
        res = []
 
106
        currency_obj = self.pool.get('res.currency')
106
107
        ids_acc = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, account.id)
 
108
        currency = account.currency_id and account.currency_id or account.company_id.currency_id
107
109
        for child_account in self.pool.get('account.account').browse(self.cr, self.uid, ids_acc, context=self.context):
108
110
            sql = """
109
111
                SELECT count(id)
119
121
                    res.append(child_account)
120
122
            elif self.display_account == 'bal_solde':
121
123
                if child_account.type != 'view' and num_entry <> 0:
122
 
                    if ( sold_account <> 0.0):
 
124
                    if not currency_obj.is_zero(self.cr, self.uid, currency, sold_account):
123
125
                        res.append(child_account)
124
126
            else:
125
127
                res.append(child_account)