[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
This commit is contained in:
parent
f9f231ea40
commit
1e75f9db2f
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue