From 47208550a22723f0dc8924376bef808fc57edc14 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 10 May 2016 17:02:07 +0200 Subject: [PATCH] [FIX] account: periods in general ledger report When "Filter by Periods" is choosen in the wizard, the right periods must be set in ctx to filter the account moves according to the right periods opw:674593 --- addons/account/report/account_general_ledger.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py index 0a0529ea854..54149cf696c 100644 --- a/addons/account/report/account_general_ledger.py +++ b/addons/account/report/account_general_ledger.py @@ -51,7 +51,9 @@ class general_ledger(report_sxw.rml_parse, common_report_header): ctx = self.context.copy() ctx['fiscalyear'] = data['form']['fiscalyear_id'] if data['form']['filter'] == 'filter_period': - ctx['periods'] = data['form']['periods'] + period_from_id = data['form']['period_from'] + period_to_id = data['form']['period_to'] + ctx['periods'] = self.pool["account.period"].build_ctx_periods(self.cr, self.uid, period_from_id, period_to_id) elif data['form']['filter'] == 'filter_date': ctx['date_from'] = data['form']['date_from'] ctx['date_to'] = data['form']['date_to']