[FIX]account : list index error when context have wrong period
bzr revid: mma@tinyerp.com-20121101122231-zrktnx90q7wj76iq
This commit is contained in:
parent
b006809773
commit
e999acd0e3
|
@ -208,7 +208,7 @@ class account_move_line(osv.osv):
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue