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.

closes odoo#158728

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
  • Loading branch information
CLaurelB committed Mar 27, 2024
1 parent 8bd51d0 commit 7a19448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/payment/views/payment_templates.xml
Expand Up @@ -350,7 +350,7 @@
<!-- Only shown if in the first 3 icons -->
<t t-foreach="provider.payment_icon_ids.filtered(lambda r: r.image_payment_form)" t-as="icon">
<li t-attf-class="list-inline-item{{'' if (icon_index &lt; MAX_ICONS) else ' d-none'}}">
<span t-esc="icon.image_payment_form"
<span t-field="icon.image_payment_form"
t-options="{'widget': 'image', 'alt-field': 'name'}"
data-bs-toggle="tooltip"
t-att-title="icon.name"/>
Expand Down

0 comments on commit 7a19448

Please sign in to comment.