[FIX] payment_payulatam: fix transaction reconsiliation

The reconsiliation code was looking for the aquirer_reference instead of
the reference to find out the corresponding transaction. Which leads to
not finding the corresponding transaction.

This behavior comes from the creation of the moule setting its own tests
in error in PR: https://github.com/odoo/odoo/pull/24802

closes odoo/odoo#31365
This commit is contained in:
Pierre Masereel
2019-02-22 13:37:10 +00:00
parent c0f8690d1b
commit e21f185d3c
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ class PaymentTransactionPayulatam(models.Model):
if not reference or not txnid or not sign:
raise ValidationError(_('PayUlatam: received data with missing reference (%s) or transaction id (%s) or sign (%s)') % (reference, txnid, sign))
transaction = self.search([('acquirer_reference', '=', reference)])
transaction = self.search([('reference', '=', reference)])
if not transaction:
error_msg = (_('PayUlatam: received data for reference %s; no order found') % (reference))
@@ -121,10 +121,9 @@ class PayUlatamForm(PayUlatamCommon):
'amount': 0.01,
'acquirer_id': self.payulatam.id,
'currency_id': self.currency_euro.id,
'reference': 'test_ref_2',
'reference': 'test_ref_10',
'partner_name': 'Norbert Buyer',
'partner_country_id': self.country_france.id,
'acquirer_reference': 'test_ref_10',
'partner_id': self.buyer_id})
# validate transaction