[FIX]Validated invoice with amount == 0.0 MUST be in account move line
bzr revid: dle@openerp.com-20121221101356-xp6x8a5naehq5z4p
This commit is contained in:
@@ -870,8 +870,6 @@ class account_invoice(osv.osv):
|
||||
if context is None:
|
||||
context = {}
|
||||
for inv in self.browse(cr, uid, ids, context=context):
|
||||
if inv.amount_total == 0.0:
|
||||
continue
|
||||
if not inv.journal_id.sequence_id:
|
||||
raise osv.except_osv(_('Error!'), _('Please define sequence on the journal related to this invoice.'))
|
||||
if not inv.invoice_line:
|
||||
@@ -1055,8 +1053,6 @@ class account_invoice(osv.osv):
|
||||
self.write(cr, uid, ids, {})
|
||||
|
||||
for obj_inv in self.browse(cr, uid, ids, context=context):
|
||||
if obj_inv.amount_total == 0.0:
|
||||
continue
|
||||
id = obj_inv.id
|
||||
invtype = obj_inv.type
|
||||
number = obj_inv.number
|
||||
|
||||
Reference in New Issue
Block a user