bug fix on credit note of invoice : invoice should not be refund at draft/proforma/cancel states
bzr revid: mra@tinyerp.com-20090305094713-6b9s0kqxnyomq42s
This commit is contained in:
parent
445cb82263
commit
52f990fde6
|
@ -63,8 +63,8 @@ class wiz_refund(wizard.interface):
|
|||
period = False
|
||||
description = False
|
||||
for inv in pool.get('account.invoice').browse(cr, uid, data['ids']):
|
||||
if inv.state == 'draft':
|
||||
raise wizard.except_wizard(_('Error !'), _('Can not %s draft invoice.') % (mode))
|
||||
if inv.state in ['draft', 'proforma2', 'cancel']:
|
||||
raise wizard.except_wizard(_('Error !'), _('Can not %s draft/proforma/cancel invoice.') % (mode))
|
||||
if form['period'] :
|
||||
period = form['period']
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue