Merge lp:~openerp-dev/openobject-addons/trunk-opw-578405-port-mma into lp:openobject-addons

Proposed by Mayur Maheshwari(OpenERP)
Status: Merged
Merged at revision: 8001
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-opw-578405-port-mma
Merge into: lp:openobject-addons
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/trunk-opw-578405-port-mma
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+132535@code.launchpad.net

Description of the change

Hello,

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

Steps:
- Open Accounting/Journal Entries/Journal Items menu.
-. 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
   Code is forward port from 6.1

Thanks
Mayur

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_move_line.py'
2--- account/account_move_line.py 2012-10-24 20:14:24 +0000
3+++ account/account_move_line.py 2012-11-01 12:25:24 +0000
4@@ -208,7 +208,7 @@
5 if type(period_id) == str:
6 ids = period_obj.search(cr, uid, [('name', 'ilike', period_id)])
7 context.update({
8- 'period_id': ids[0]
9+ 'period_id': ids and ids[0] or False
10 })
11 return context
12

Subscribers

People subscribed via source and target branches

to all changes: