[FIX] Fixed type of invoices in online payment.

bzr revid: vta@openerp.com-20121129142146-1c8z7zqrsm9icbym
This commit is contained in:
vta vta@openerp.com 2012-11-29 15:21:46 +01:00
parent 99064105fd
commit f5dffcfd11
3 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@
% endif
</p>
% if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'):
% if object.company_id.paypal_account and object.type in ('out_invoice'):
<%
comp_name = quote(object.company_id.name)
inv_number = quote(object.number)

View File

@ -67,7 +67,7 @@ class account_invoice(osv.Model):
result = dict.fromkeys(ids, False)
payment_acquirer = self.pool.get('portal.payment.acquirer')
for this in self.browse(cr, uid, ids, context=context):
if this.state not in ('draft','done') and not this.reconciled:
if this.type == 'out_invoice' and this.state not in ('draft','done') and not this.reconciled:
result[this.id] = payment_acquirer.render_payment_block(cr, uid, this, this.number,
this.currency_id, this.residual, context=context)
return result

View File

@ -150,7 +150,7 @@
href="${signup_url}">View Invoice</a>
% endif
% if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'):
% if object.company_id.paypal_account and object.type in ('out_invoice'):
<%
comp_name = quote(object.company_id.name)
inv_number = quote(object.number)