Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Payment Engine

Entity: payment.provider

Compute Method: _compute_feature_support_fields

View 17.0 View 19.0
Inputs Method Outputs
""" Compute the feature support fields based on the provider.

        Feature support fields are used to specify which additional features are supported by a
        given provider. These fields are as follows:

        - `support_express_checkout`: Whether the "express checkout" feature is supported. `False`
          by default.
        - `support_manual_capture`: Whether the "manual capture" feature is supported. `False` by
          default.
        - `support_refund`: Which type of the "refunds" feature is supported: `None`,
          `'full_only'`, or `'partial'`. `None` by default.
        - `support_tokenization`: Whether the "tokenization feature" is supported. `False` by
          default.

        For a provider to specify that it supports additional features, it must override this method
        and set the related feature support fields to the desired value on the appropriate
        `payment.provider` records.

        :return: None
        """
- self.update(dict.fromkeys((
-             'support_express_checkout',
-             'support_manual_capture',
-             'support_refund',
-             'support_tokenization',
-         ), None))
+ self.update({
+             'support_express_checkout': None,
+             'support_manual_capture': None,
+             'support_tokenization': None,
+             'support_refund': 'none',
+         })

Back to entity