Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-opw-578405-port-mma into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-578405-port-mma/+merge/132535

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
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-578405-port-mma/+merge/132535
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-opw-578405-port-mma.
=== 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 @@
             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