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
=== modified file 'account/report/account_balance_sheet.py'
--- account/report/account_balance_sheet.py 2011-06-29 05:29:28 +0000
+++ account/report/account_balance_sheet.py 2012-02-20 10:39:19 +0000
@@ -102,7 +102,8 @@
102 ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False)102 ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False)
103103
104 if data['form']['filter'] == 'filter_period':104 if data['form']['filter'] == 'filter_period':
105 ctx['periods'] = data['form'].get('periods', False)105 ctx['period_from']= data['form'].get('period_from', False)
106 ctx['period_to']= data['form'].get('period_to', False)
106 elif data['form']['filter'] == 'filter_date':107 elif data['form']['filter'] == 'filter_date':
107 ctx['date_from'] = data['form'].get('date_from', False)108 ctx['date_from'] = data['form'].get('date_from', False)
108 ctx['date_to'] = data['form'].get('date_to', False)109 ctx['date_to'] = data['form'].get('date_to', False)
109110
=== modified file 'account/report/account_general_ledger.py'
--- account/report/account_general_ledger.py 2011-01-14 00:11:01 +0000
+++ account/report/account_general_ledger.py 2012-02-20 10:39:19 +0000
@@ -48,7 +48,8 @@
48 ctx = self.context.copy()48 ctx = self.context.copy()
49 ctx['fiscalyear'] = data['form']['fiscalyear_id']49 ctx['fiscalyear'] = data['form']['fiscalyear_id']
50 if data['form']['filter'] == 'filter_period':50 if data['form']['filter'] == 'filter_period':
51 ctx['periods'] = data['form']['periods']51 ctx['period_from']= data['form'].get('period_from', False)
52 ctx['period_to']= data['form'].get('period_to', False)
52 elif data['form']['filter'] == 'filter_date':53 elif data['form']['filter'] == 'filter_date':
53 ctx['date_from'] = data['form']['date_from']54 ctx['date_from'] = data['form']['date_from']
54 ctx['date_to'] = data['form']['date_to']55 ctx['date_to'] = data['form']['date_to']
5556
=== modified file 'account/report/account_profit_loss.py'
--- account/report/account_profit_loss.py 2011-08-04 13:15:39 +0000
+++ account/report/account_profit_loss.py 2012-02-20 10:39:19 +0000
@@ -99,7 +99,8 @@
99 ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False)99 ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False)
100100
101 if data['form']['filter'] == 'filter_period':101 if data['form']['filter'] == 'filter_period':
102 ctx['periods'] = data['form'].get('periods', False)102 ctx['period_from']= data['form'].get('period_from', False)
103 ctx['period_to']= data['form'].get('period_to', False)
103 elif data['form']['filter'] == 'filter_date':104 elif data['form']['filter'] == 'filter_date':
104 ctx['date_from'] = data['form'].get('date_from', False)105 ctx['date_from'] = data['form'].get('date_from', False)
105 ctx['date_to'] = data['form'].get('date_to', False)106 ctx['date_to'] = data['form'].get('date_to', False)