From 923e11395eee57ed2870a81ff08da71f269110d2 Mon Sep 17 00:00:00 2001 From: vrenaville Date: Thu, 25 Sep 2014 11:13:30 +0200 Subject: [PATCH] [FIX] Prevent remove partial reconcile, when you use easy reconcile --- account_easy_reconcile/base_reconciliation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/account_easy_reconcile/base_reconciliation.py b/account_easy_reconcile/base_reconciliation.py index 9aeb6d44..b324d1ba 100644 --- a/account_easy_reconcile/base_reconciliation.py +++ b/account_easy_reconcile/base_reconciliation.py @@ -79,10 +79,13 @@ class EasyReconcileBase(orm.AbstractModel): return "SELECT %s" % ', '.join(self._base_columns(rec)) def _from(self, rec, *args, **kwargs): - return "FROM account_move_line" + return ("FROM account_move_line " + "LEFT OUTER JOIN account_move_reconcile ON (account_move_line.reconcile_partial_id = account_move_reconcile.id)" + ) 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 ") # it would be great to use dict for params # but as we use _where_calc in _get_filter