[ADD]:Added Upstream patch for payment_sips
This commit is contained in:
parent
e978d8c5a5
commit
623614afff
@ -1,2 +1,3 @@
|
||||
from . import models
|
||||
from . import controllers
|
||||
from flectra.addons.payment.models.payment_acquirer import create_missing_journal_for_acquirers
|
||||
|
@ -20,4 +20,5 @@ payments acquirer using Worldline SIPS.""",
|
||||
'data/payment_acquirer_data.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'post_init_hook': 'create_missing_journal_for_acquirers',
|
||||
}
|
||||
|
@ -111,6 +111,16 @@ class AcquirerSips(models.Model):
|
||||
return self.environment == 'prod' and self.sips_prod_url or self.sips_test_url
|
||||
|
||||
|
||||
class PaymentTransactionSips(models.Model):
|
||||
_inherit = 'payment.transaction'
|
||||
|
||||
@api.model
|
||||
def _get_next_reference(self, reference, acquirer=None):
|
||||
if acquirer and acquirer.provider == 'sips':
|
||||
reference = re.sub(r'[^0-9a-zA-Z]+', 'x' , reference)
|
||||
return super(PaymentTransactionSips, self)._get_next_reference(reference, acquirer=acquirer)
|
||||
|
||||
|
||||
class TxSips(models.Model):
|
||||
_inherit = 'payment.transaction'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user