[FIX] Fixed type of invoices in online payment.
bzr revid: vta@openerp.com-20121129142146-1c8z7zqrsm9icbym
This commit is contained in:
parent
99064105fd
commit
f5dffcfd11
|
@ -49,7 +49,7 @@
|
||||||
% endif
|
% endif
|
||||||
</p>
|
</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)
|
comp_name = quote(object.company_id.name)
|
||||||
inv_number = quote(object.number)
|
inv_number = quote(object.number)
|
||||||
|
|
|
@ -67,7 +67,7 @@ class account_invoice(osv.Model):
|
||||||
result = dict.fromkeys(ids, False)
|
result = dict.fromkeys(ids, False)
|
||||||
payment_acquirer = self.pool.get('portal.payment.acquirer')
|
payment_acquirer = self.pool.get('portal.payment.acquirer')
|
||||||
for this in self.browse(cr, uid, ids, context=context):
|
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,
|
result[this.id] = payment_acquirer.render_payment_block(cr, uid, this, this.number,
|
||||||
this.currency_id, this.residual, context=context)
|
this.currency_id, this.residual, context=context)
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
href="${signup_url}">View Invoice</a>
|
href="${signup_url}">View Invoice</a>
|
||||||
% endif
|
% 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)
|
comp_name = quote(object.company_id.name)
|
||||||
inv_number = quote(object.number)
|
inv_number = quote(object.number)
|
||||||
|
|
Loading…
Reference in New Issue