From a13c63f8a9700d68047fa2e6989c6abba0c3144a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 11 Apr 2011 11:28:19 +0200 Subject: [PATCH] Fix AgedBalance and ThirdPartyBalance to respect the fiscalyear selected --- account.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/account.py b/account.py index 6873d17fc7..13365630a0 100644 --- a/account.py +++ b/account.py @@ -2073,7 +2073,8 @@ class ThirdPartyBalance(Report): localcontext['company'] = company localcontext['digits'] = company.currency.digits localcontext['fiscalyear'] = datas['form']['fiscalyear'] - line_query, _ = move_line_obj.query_get() + with Transaction().set_context(context=localcontext): + line_query, _ = move_line_obj.query_get() if datas['form']['posted']: posted_clause = "AND m.state = 'posted' " else: @@ -2221,7 +2222,8 @@ class AgedBalance(Report): localcontext['digits'] = company.currency.digits localcontext['fiscalyear'] = datas['form']['fiscalyear'] localcontext['posted'] = datas['form']['posted'] - line_query, _ = move_line_obj.query_get() + with Transaction().set_context(context=localcontext): + line_query, _ = move_line_obj.query_get() terms = (datas['form']['term1'], datas['form']['term2'],