- class odoo.addons.payment.models.payment_token.PaymentToken¶
- _build_display_name(*args, max_length=34, should_pad=True, **kwargs)¶
Build a token name of the desired maximum length with the format
The payment details are padded on the left with up to four padding characters. The padding is only added if there is enough room for it. If not, it is either reduced or not added at all. If there is not enough room for the payment details either, they are trimmed from the left.
For a module to customize the display name of a token, it must override this method and return the customized display name.
The padded token name.
- Return type
- _get_specific_create_values(provider_code, values)¶
Complete the values of the
createmethod with provider-specific values.
For a provider to add its own create values, it must overwrite this method and return a dict of values. Provider-specific values take precedence over those of the dict of generic create values.
Handle the archiving of tokens.
For a module to perform additional operations when a token is archived, it must override this method.
Return a list of information about records linked to the current token.
For a module to implement payments and link documents to a token, it must override this method and add information about linked document records to the returned list.
The information must be structured as a dict with the following keys:
description: The description of the record’s model (e.g. “Subscription”).
id: The id of the record.
name: The name of the record.
url: The url to access the record.
The list of information about the linked document records.
- Return type