From 39b8bdd07eb4b872fe8572fe0aa04d860eb72aa8 Mon Sep 17 00:00:00 2001 From: vra Date: Tue, 31 Aug 2010 15:06:06 +0530 Subject: [PATCH] [FIX] account: return single 'id' instead of list in find method of account.period object. bzr revid: vra@tinyerp.com-20100831093606-9mpu5gml239ih1je --- addons/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index e7db4271f1e..ad23e66c2a7 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -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'