mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 06:12:06 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -0,0 +1,21 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class PaymentToken(models.Model):
|
||||
_inherit = 'payment.token'
|
||||
|
||||
def _get_available_tokens(self, *args, is_express_checkout=False, **kwargs):
|
||||
""" Override of `payment` not to return the tokens in case of express checkout.
|
||||
|
||||
:param dict args: Locally unused arguments.
|
||||
:param bool is_express_checkout: Whether the payment is made through express checkout.
|
||||
:param dict kwargs: Locally unused keywords arguments.
|
||||
:return: The available tokens.
|
||||
:rtype: payment.token
|
||||
"""
|
||||
if is_express_checkout:
|
||||
return self.env['payment.token']
|
||||
|
||||
return super()._get_available_tokens(*args, **kwargs)
|
||||
Loading…
Add table
Add a link
Reference in a new issue