From d36a90b39e264be4716ce81087ab4a0fe08c4c2b Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 15 Oct 2013 14:10:15 +0200 Subject: [PATCH] [FIX] account: correctly compute debit/credit for partner including previous moves reported to new fiscal year lp bug: https://launchpad.net/bugs/1219381 fixed bzr revid: mat@openerp.com-20131015121015-jdwkzv9tjicg2m1u --- addons/account/partner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/partner.py b/addons/account/partner.py index 4914a17dd2b..64896338476 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -116,7 +116,8 @@ class res_partner(osv.osv): LEFT JOIN account_account a ON (l.account_id=a.id) WHERE a.type IN ('receivable','payable') AND l.partner_id IN %s - AND l.reconcile_id IS NULL + AND (l.reconcile_id IS NULL OR + reconcile_id in (SELECT id FROM account_move_reconcile WHERE opening_reconciliation is TRUE)) AND """ + query + """ GROUP BY l.partner_id, a.type """,