bug fix 337680

bzr revid: mra@tinyerp.com-20090304112844-jdk1ka4b6g5dlsj4
This commit is contained in:
mra (Open ERP)
2009-03-04 16:58:44 +05:30
parent 5ead55768e
commit 7531415448
+3 -3
View File
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
@@ -111,8 +111,8 @@ def _get_period(self, cr, uid, data, context={}):
if len(ids):
period_id = ids[0]
invoice = pool.get('account.invoice').browse(cr, uid, data['id'], context)
if invoice.state == 'draft':
raise wizard.except_wizard(_('Error !'), _('Can not pay draft invoice.'))
if invoice.state in ['draft', 'proforma2', 'cancel']:
raise wizard.except_wizard(_('Error !'), _('Can not pay draft/proforma/cancel invoice.'))
return {
'period_id': period_id,
'amount': invoice.residual,