From f7ff5db3ab22981c9e08068ade734a849739053b Mon Sep 17 00:00:00 2001 From: Matthieu Dietrich Date: Mon, 12 Jan 2015 14:40:32 +0100 Subject: [PATCH] Avoid unbalanced move lines in easy reconcile --- account_easy_reconcile/base_reconciliation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account_easy_reconcile/base_reconciliation.py b/account_easy_reconcile/base_reconciliation.py index 35ce4920..2803d4e5 100644 --- a/account_easy_reconcile/base_reconciliation.py +++ b/account_easy_reconcile/base_reconciliation.py @@ -88,7 +88,8 @@ class EasyReconcileBase(orm.AbstractModel): def _where(self, rec, *args, **kwargs): where = ("WHERE account_move_line.account_id = %s " "AND COALESCE(account_move_reconcile.type,'') <> 'manual' " - "AND account_move_line.reconcile_id IS NULL ") + "AND account_move_line.reconcile_id IS NULL " + "AND account_move_line.state != 'draft' ") # it would be great to use dict for params # but as we use _where_calc in _get_filter # which returns a list, we have to