From 1e75f9db2f74823c9732fd78e2ef00bf1c1d0e54 Mon Sep 17 00:00:00 2001 From: Rifakat Date: Wed, 20 Jun 2012 15:24:35 +0530 Subject: [PATCH] [FIX] account: one day period should not be used while generating invoice, one day period which is exclusively used for initial opening entries while closing any fiscal year bzr revid: rha@tinyerp.com-20120620095435-ws0dr4g3cz5l4r23 --- addons/account/account.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/account/account.py b/addons/account/account.py index c165a7f3b42..b7c76ac892a 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1050,6 +1050,9 @@ class account_period(osv.osv): ids = self.search(cr, uid, args, context=context) if not ids: raise osv.except_osv(_('Error !'), _('No period defined for this date: %s !\nPlease create one.')%dt) + for period in self.browse(cr, uid, ids, context=context): + if period.date_start == period.date_stop: + ids.remove(period.id) return ids def action_draft(self, cr, uid, ids, *args):