Merge pull request #6213 from expsa/token_icon

[IMP] payment_hyperpay_tokenization: remove icon if not set
This commit is contained in:
abdurrahman-saber 2026-01-18 10:52:53 +02:00 committed by GitHub
commit aa137db6a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View File

@ -13,4 +13,17 @@
</field>
</record>
<record id="payment_token_form_view" model="ir.ui.view">
<field name="name">payment.token.form.view</field>
<field name="model">payment.token</field>
<field name="inherit_id" ref="payment.payment_token_form_view"/>
<field name="arch" type="xml">
<field name="acquirer_ref" position="after">
<field name="payment_icon_id" />
<field name="hyperpay_initial_transaction_id" />
<field name="hyperpay_payment_brand" />
</field>
</field>
</record>
</odoo>

View File

@ -3,7 +3,7 @@
<template id="payment_hyperpay_tokenization.payment_tokens_list" inherit_id="payment.payment_tokens_list">
<xpath expr="//t[@t-foreach='pms']//label" position="after">
<ul class="float-right list-inline payment_icon_list">
<ul class="float-right list-inline payment_icon_list" t-if="pm.payment_icon_id">
<li t-attf-class="list-inline-item">
<span t-field="pm.payment_icon_id.image_payment_form" t-options='{"widget": "image", "alt-field": "hyperpay_payment_brand"}'/>
</li>