Skip to content

Commit bcbde8f

Browse files
csan-odoovchu-odoo
authored andcommitted
[IMP] payment: remove unused _should_build_inline_form method
Replaced by mode in payment forms and _get_compatible_providers. task-4911075 closes odoo#229541 Related: odoo/documentation#14754 Signed-off-by: Antoine Vandevenne (anv) <[email protected]>
1 parent 09a5beb commit bcbde8f

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

addons/payment/models/payment_provider.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -675,19 +675,6 @@ def _is_tokenization_required(self, **kwargs):
675675
"""
676676
return False
677677

678-
def _should_build_inline_form(self, is_validation=False):
679-
""" Return whether the inline payment form should be instantiated.
680-
681-
For a provider to handle both direct payments and payments with redirection, it must
682-
override this method and return whether the inline payment form should be instantiated (i.e.
683-
if the payment should be direct) based on the operation (online payment or validation).
684-
685-
:param bool is_validation: Whether the operation is a validation.
686-
:return: Whether the inline form should be instantiated.
687-
:rtype: bool
688-
"""
689-
return True
690-
691678
def _get_validation_amount(self):
692679
""" Return the amount to use for validation operations.
693680

addons/payment/views/payment_form_templates.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,7 @@
322322
</div>
323323
<!-- === Inline form === -->
324324
<div name="o_payment_inline_form" class="position-relative d-none">
325-
<t t-if="inline_form_xml_id and provider_sudo._should_build_inline_form(
326-
is_validation=mode == 'validation'
327-
)"
328-
t-call="{{inline_form_xml_id}}"
329-
>
325+
<t t-if="inline_form_xml_id" t-call="{{inline_form_xml_id}}">
330326
<t t-set="provider_id" t-value="provider_sudo.id"/>
331327
</t>
332328
<div class="d-flex flex-column flex-sm-row align-md-items-center justify-content-between

0 commit comments

Comments
 (0)