Skip to content

Commit

Permalink
[FIX] Payment: prevent error in rendering payment icon list with PIL …
Browse files Browse the repository at this point in the history
…incompatible icon image formats

Replace the use of 't-esc' with 't-field' for the payment icon image in
the icons list template. The latter, for an image field, provides two
options for rendering the payment icon image: use the PIL library to
obtain the image when given the option 'qweb_img_raw_data', or use a
URL. The former only considers the first option, allowing only image
formats compatible with the PIL library.

X-original-commit: 7a19448
  • Loading branch information
CLaurelB authored and AntoineVDV committed Mar 27, 2024
1 parent 3abb836 commit 7506d6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/payment/views/payment_templates.xml
Expand Up @@ -401,7 +401,7 @@
<!-- Only shown if in the first 3 icons -->
<t t-foreach="provider.payment_method_ids.filtered(lambda r: r.image_payment_form)" t-as="payment_method">
<li t-attf-class="list-inline-item{{'' if (icon_index &lt; MAX_ICONS_DISPLAYED) else ' d-none'}}">
<span t-esc="payment_method.image_payment_form"
<span t-field="payment_method.image_payment_form"
t-options="{'widget': 'image', 'alt-field': 'name'}"
data-bs-toggle="tooltip"
t-att-title="payment_method.name"/>
Expand Down

0 comments on commit 7506d6f

Please sign in to comment.