[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
This commit is contained in:
parent
ac8b7e90b5
commit
47208550a2
|
@ -51,7 +51,9 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
|
||||||
ctx = self.context.copy()
|
ctx = self.context.copy()
|
||||||
ctx['fiscalyear'] = data['form']['fiscalyear_id']
|
ctx['fiscalyear'] = data['form']['fiscalyear_id']
|
||||||
if data['form']['filter'] == 'filter_period':
|
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':
|
elif data['form']['filter'] == 'filter_date':
|
||||||
ctx['date_from'] = data['form']['date_from']
|
ctx['date_from'] = data['form']['date_from']
|
||||||
ctx['date_to'] = data['form']['date_to']
|
ctx['date_to'] = data['form']['date_to']
|
||||||
|
|
Loading…
Reference in New Issue