Comment 5 for bug 557325

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

This code must be removed from addons/base/res/res_currency.py
(remove the account arg also)

2 if account and (account.currency_mode=='average') and account.currency_id:
2 q = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
2 cr.execute('select sum(debit-credit),sum(amount_currency) from account_move_line l ' \
2 'where l.currency_id=%s and l.account_id=%s and '+q, (account.currency_id.id,account.id,))
2 tot1,tot2 = cr.fetchone()