[FIX] Allow receivables from closed fiscal years

This commit is contained in:
Stefan Rijnhart
2015-04-24 16:59:02 +02:00
parent 6414ecac6b
commit 7a6467140b

View File

@@ -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