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
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2012-10-24 20:14:24 +0000
+++ account/account_move_line.py 2012-11-01 12:25:24 +0000
@@ -208,7 +208,7 @@
208 if type(period_id) == str:208 if type(period_id) == str:
209 ids = period_obj.search(cr, uid, [('name', 'ilike', period_id)])209 ids = period_obj.search(cr, uid, [('name', 'ilike', period_id)])
210 context.update({210 context.update({
211 'period_id': ids[0]211 'period_id': ids and ids[0] or False
212 })212 })
213 return context213 return context
214214

Subscribers

People subscribed via source and target branches

to all changes: