bzr revid: nel@tinyerp.com-20090305104935-bviod1jd5g6nnsm8
This commit is contained in:
Najlaâ EL KHAYAT
2009-03-05 11:49:35 +01:00
+2 -2
View File
@@ -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: