[FIX] account: return single 'id' instead of list in find method of account.period object.

bzr revid: vra@tinyerp.com-20100831093606-9mpu5gml239ih1je
This commit is contained in:
vra
2010-08-31 15:06:06 +05:30
parent 71e4669a43
commit 39b8bdd07e
+1 -1
View File
@@ -883,7 +883,7 @@ class account_period(osv.osv):
ids = self.search(cr, uid, [('date_start','<=',dt),('date_stop','>=',dt)])
if not ids:
raise osv.except_osv(_('Error !'), _('No period defined for this date: %s !\nPlease create a fiscal year.')%dt)
return ids
return ids and ids[0] or False
def action_draft(self, cr, uid, ids, *args):
mode = 'draft'