From 52f990fde6fb41a7fd22d974d487acb191d7e3ff Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Thu, 5 Mar 2009 15:17:13 +0530 Subject: [PATCH] bug fix on credit note of invoice : invoice should not be refund at draft/proforma/cancel states bzr revid: mra@tinyerp.com-20090305094713-6b9s0kqxnyomq42s --- addons/account/wizard/wizard_refund.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/wizard/wizard_refund.py b/addons/account/wizard/wizard_refund.py index 85ecb258971..90a9ce76c11 100644 --- a/addons/account/wizard/wizard_refund.py +++ b/addons/account/wizard/wizard_refund.py @@ -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: