[FIX] account: added notification on absence of invoice sequence number
bzr revid: vra@tinyerp.com-20100805105403-j7ipqdt6zjfao1k7
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user