[MERGE] [FIX] payment_acquirer: fixed browsing a transaction using a wrong model

[FIX] paypal: fixed a typo in transaction validation

Courtesy of Joshua Jan (SHINEIT)

bzr revid: tde@openerp.com-20131220082609-y8d15fb4onck534h
This commit is contained in:
Thibault Delavallée 2013-12-20 09:26:09 +01:00
commit 049f0c26e1
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ class PaymentAcquirer(osv.Model):
acquirer = self.browse(cr, uid, id, context=context)
if tx_id:
tx = self.browse(cr, uid, id, context=context)
tx = self.pool.get('payment.transaction').browse(cr, uid, tx_id, context=context)
tx_data = {
'reference': tx.reference,
'amount': tx.amount,

View File

@ -213,7 +213,7 @@ class TxPaypal(osv.Model):
return tx.write(data)
elif status in ['Pending', 'Expired']:
_logger.info('Received notification for Paypal payment %s: set as pending' % (tx.reference))
data.udpate(state='pending', state_message=data.get('pending_reason', ''))
data.update(state='pending', state_message=data.get('pending_reason', ''))
return tx.write(data)
else:
error = 'Received unrecognized status for Paypal payment %s: %s, set as error' % (tx.reference, status)