From 7a6467140b691295be3453929964026857abe6f9 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Fri, 24 Apr 2015 16:59:02 +0200 Subject: [PATCH] [FIX] Allow receivables from closed fiscal years --- account_direct_debit/models/account_move_line.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account_direct_debit/models/account_move_line.py b/account_direct_debit/models/account_move_line.py index 88b73f84f..86c294dee 100644 --- a/account_direct_debit/models/account_move_line.py +++ b/account_direct_debit/models/account_move_line.py @@ -58,7 +58,8 @@ class AccountMoveLine(orm.Model): if not args: return [] line_obj = self.pool.get('account.move.line') - query = line_obj._query_get(cr, uid, context=context) + search_context = dict(context or {}, all_fiscalyear=True) + query = line_obj._query_get(cr, uid, context=search_context) where = ' and '.join(map(lambda x: '''(SELECT CASE WHEN l.amount_currency > 0 THEN l.amount_currency