From 280454b068467c1844ed9ce7b7547f09e715818e Mon Sep 17 00:00:00 2001
From: Florent de Labarre <florent.mirieu@gmail.com>
Date: Fri, 21 Apr 2023 06:52:52 +0000
Subject: [PATCH] [FIX] website_sale: show correctly the acquirer name

Like here https://github.com/odoo/odoo/blob/14.0/addons/payment/views/payment_templates.xml#L69, if the acquirer have display_as, it is more logical to shpw everywhere this field.

closes odoo/odoo#119295

Signed-off-by: Valentin Chevalier <vcr@odoo.com>
---
 addons/website_sale/views/templates.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml
index 6532845d0a8f..b194b934e201 100644
--- a/addons/website_sale/views/templates.xml
+++ b/addons/website_sale/views/templates.xml
@@ -1672,13 +1672,13 @@
                                     <tbody>
                                         <tr>
                                             <td colspan="2">
-                                                <t t-esc="order.get_portal_last_transaction().acquirer_id.name" />
+                                                <t t-set="last_transaction" t-value="order.get_portal_last_transaction()"/>
+                                                <t t-esc="last_transaction.acquirer_id.display_as or last_transaction.acquirer_id.name" />
                                             </td>
                                             <td class="text-right" width="100">
                                                 <strong>Total:</strong>
                                             </td>
                                             <td class="text-right" width="100">
-                                                <t t-set="last_transaction" t-value="order.get_portal_last_transaction()"/>
                                                 <strong t-field="last_transaction.amount" t-options="{'widget': 'monetary', 'display_currency': last_transaction.currency_id}" />
                                             </td>
                                         </tr>
-- 
GitLab