Merge lp:~openerp-dev/openobject-addons/6.1-opw-578405-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6961
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-578405-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 11 lines (+1/-1)
1 file modified
account/account_move_line.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-578405-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+121147@code.launchpad.net

Description of the change

Hello Sir,

[FIX]account.move.line: list index out of range error when context have wrong period name.

Steps:
1. Open Accounting/Journal Entries/Journal Items menu.
2. select "Sale Journal" and type period as "08/12" and press Search button.
Error Occurred:
IndexError: list index out of range

This branch fixes this issue. Kindly review the branch and please share your views on it.

Thanks
Somesh Khare

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

Hello,

This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-578405-port-mma/+merge/132535 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6961. By Somesh Khare

[FIX]account.move.line: list index error when context have wrong period (Case: ref 578405 )

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2012-07-27 11:43:03 +0000
+++ account/account_move_line.py 2012-08-24 09:49:21 +0000
@@ -207,7 +207,7 @@
207 if type(period_id) == str:207 if type(period_id) == str:
208 ids = period_obj.search(cr, uid, [('name', 'ilike', period_id)])208 ids = period_obj.search(cr, uid, [('name', 'ilike', period_id)])
209 context.update({209 context.update({
210 'period_id': ids[0]210 'period_id': ids and ids[0] or False
211 })211 })
212 return context212 return context
213213