diff --git a/addons/payment_acquirer/models/payment_acquirer.py b/addons/payment_acquirer/models/payment_acquirer.py index b88601e88f5..3bf18b64be0 100644 --- a/addons/payment_acquirer/models/payment_acquirer.py +++ b/addons/payment_acquirer/models/payment_acquirer.py @@ -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, diff --git a/addons/payment_acquirer_paypal/models/paypal.py b/addons/payment_acquirer_paypal/models/paypal.py index 8a9fac7cc46..32e17711bef 100644 --- a/addons/payment_acquirer_paypal/models/paypal.py +++ b/addons/payment_acquirer_paypal/models/paypal.py @@ -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)