Merge lp:~openerp-dev/openobject-addons/6.0-opw-383665-ado into lp:openobject-addons/6.0

Proposed by Amit Dodiya (OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: no longer in the source branch.
Merged at revision: 5171
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-383665-ado
Merge into: lp:openobject-addons/6.0
Diff against target: 41 lines (+6/-3)
3 files modified
account/report/account_balance_sheet.py (+2/-1)
account/report/account_general_ledger.py (+2/-1)
account/report/account_profit_loss.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-383665-ado
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
nel Pending
Review via email: mp+93361@code.launchpad.net

Description of the change

Hello,

The period filter in the profit and loss report doesn't seem to be working.

If you look in account/report/account_profit_loss.py (around line 101) :
        if data['form']['filter'] == 'filter_period':
            ctx['periods'] = data['form'].get('periods', False)
Periods will always gives you blank list.

ctx should be updated like:
        ctx['period_from']= data['form'].get('period_from', False)
        ctx['period_to']= data['form'].get('period_to', False)

Thanks,
Amit

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/report/account_balance_sheet.py'
2--- account/report/account_balance_sheet.py 2011-06-29 05:29:28 +0000
3+++ account/report/account_balance_sheet.py 2012-02-20 10:39:19 +0000
4@@ -102,7 +102,8 @@
5 ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False)
6
7 if data['form']['filter'] == 'filter_period':
8- ctx['periods'] = data['form'].get('periods', False)
9+ ctx['period_from']= data['form'].get('period_from', False)
10+ ctx['period_to']= data['form'].get('period_to', False)
11 elif data['form']['filter'] == 'filter_date':
12 ctx['date_from'] = data['form'].get('date_from', False)
13 ctx['date_to'] = data['form'].get('date_to', False)
14
15=== modified file 'account/report/account_general_ledger.py'
16--- account/report/account_general_ledger.py 2011-01-14 00:11:01 +0000
17+++ account/report/account_general_ledger.py 2012-02-20 10:39:19 +0000
18@@ -48,7 +48,8 @@
19 ctx = self.context.copy()
20 ctx['fiscalyear'] = data['form']['fiscalyear_id']
21 if data['form']['filter'] == 'filter_period':
22- ctx['periods'] = data['form']['periods']
23+ ctx['period_from']= data['form'].get('period_from', False)
24+ ctx['period_to']= data['form'].get('period_to', False)
25 elif data['form']['filter'] == 'filter_date':
26 ctx['date_from'] = data['form']['date_from']
27 ctx['date_to'] = data['form']['date_to']
28
29=== modified file 'account/report/account_profit_loss.py'
30--- account/report/account_profit_loss.py 2011-08-04 13:15:39 +0000
31+++ account/report/account_profit_loss.py 2012-02-20 10:39:19 +0000
32@@ -99,7 +99,8 @@
33 ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False)
34
35 if data['form']['filter'] == 'filter_period':
36- ctx['periods'] = data['form'].get('periods', False)
37+ ctx['period_from']= data['form'].get('period_from', False)
38+ ctx['period_to']= data['form'].get('period_to', False)
39 elif data['form']['filter'] == 'filter_date':
40 ctx['date_from'] = data['form'].get('date_from', False)
41 ctx['date_to'] = data['form'].get('date_to', False)