[FIX] account: added notification on absence of invoice sequence number

bzr revid: vra@tinyerp.com-20100805105403-j7ipqdt6zjfao1k7
This commit is contained in:
vra
2010-08-05 16:24:03 +05:30
parent c5d49c63f4
commit 86c6ecb5b2
+3
View File
@@ -942,6 +942,9 @@ class account_invoice(osv.osv):
number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
else:
number = self.pool.get('ir.sequence').get(cr, uid, 'account.invoice.' + invtype)
if not number:
raise osv.except_osv(_('Warning !'), _('There is no active invoice sequence defined for the journal !'))
if invtype in ('in_invoice', 'in_refund'):
ref = reference