From 0b385ca3092d02993964524df95a1ce95db1b083 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Fri, 2 Jul 2010 12:23:52 +0530 Subject: [PATCH] [IMP] account: Add the warning if user try to create invoice without defining invoice sequence field on jounrnal bzr revid: mra@mra-laptop-20100702065352-9w7x2x6p7p2ea3vj --- addons/account/invoice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 4e64507b496..13569987560 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -767,6 +767,8 @@ class account_invoice(osv.osv): cur_obj = self.pool.get('res.currency') context = {} for inv in self.browse(cr, uid, ids): + if not inv.journal_id.invoice_sequence_id: + raise osv.except_osv(_('Error !'), _('Please define invoice sequence on invoice journal')) if not inv.invoice_line: raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.')) if inv.move_id: