[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
This commit is contained in:
Mustufa Rangwala 2010-07-02 12:23:52 +05:30
parent 047be68674
commit 0b385ca309
1 changed files with 2 additions and 0 deletions

View File

@ -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: