[FIX] account: add exception if no lines found in account.voucher object

bzr revid: vth@tinyerp.com-20101019131109-wrosvxj31ihkc1ya
This commit is contained in:
vth
2010-10-19 18:41:09 +05:30
parent 7a8f457406
commit 2ae556a213
@@ -574,6 +574,8 @@ class account_voucher(osv.osv):
currency_pool = self.pool.get('res.currency')
tax_obj = self.pool.get('account.tax')
for inv in self.browse(cr, uid, ids):
if not inv.line_ids:
raise osv.except_osv(_('No Lines !'), _('Please create some lines'))
if inv.move_id:
continue
if inv.number: