[FIX] pass correct parameter to compute the balance on partner form with all entries...
authorNhomar Hernandez <nhomar@gmail.com>
Sun, 1 Sep 2013 06:44:06 +0000 (02:14 -0430)
committerNhomar Hernandez <nhomar@gmail.com>
Sun, 1 Sep 2013 06:44:06 +0000 (02:14 -0430)
lp bug: https://launchpad.net/bugs/1219381 fixed

bzr revid: nhomar@gmail.com-20130901064406-ehfuhwpjq0ti6oed

addons/account/partner.py

index 4914a17..22d6fce 100644 (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)