[FIX] pass correct parameter to compute the balance on partner form with all entries not complete reconciled

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

bzr revid: nhomar@gmail.com-20130901064406-ehfuhwpjq0ti6oed
This commit is contained in:
Nhomar Hernandez 2013-09-01 02:14:06 -04:30
parent fb49bb4fb3
commit 9382f31c7d
1 changed files with 3 additions and 1 deletions

View File

@ -110,7 +110,9 @@ class res_partner(osv.osv):
_description = 'Partner'
def _credit_debit_get(self, cr, uid, ids, field_names, arg, context=None):
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
ctx = context.copy()
ctx['all_fiscalyear'] = True
query = self.pool.get('account.move.line')._query_get(cr, uid, context=ctx)
cr.execute("""SELECT l.partner_id, a.type, SUM(l.debit-l.credit)
FROM account_move_line l
LEFT JOIN account_account a ON (l.account_id=a.id)