fix bug : 337680
bzr revid: mra@tinyerp.com-20090304115219-rsk3z1fliz6ck4az
This commit is contained in:
parent
21ca788cca
commit
ad2bc76a2c
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue