Somesh Khare(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-578405-skh into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-578405-skh/+merge/121147

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
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-578405-skh/+merge/121147
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-578405-skh.
=== 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 @@
             if type(period_id) == str:
                 ids = period_obj.search(cr, uid, [('name', 'ilike', period_id)])
                 context.update({
-                    'period_id': ids[0]
+                    'period_id': ids and ids[0] or False
                 })
         return context
 

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to