From 279d3ce00b712d5bb14a3e4554ddac627e08de7a Mon Sep 17 00:00:00 2001 From: odooqs <sum1201@gmail.com> Date: Thu, 16 Jan 2020 08:00:42 +0000 Subject: [PATCH] [FIX] point_of_sale: payment method name not displayed When a payment line is created, and then the order is reloaded, by the synchronization feature for example, the name displayed on the payment line is empty. This happens because the field name is not saved on the server, so instead of using it, we are directly taking the name of the payment method linked to the payment line. closes odoo/odoo#43615 X-original-commit: ae4322cd81814cf4cdc462ff9d271f83ce2870c4 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com> --- addons/point_of_sale/static/src/xml/pos.xml | 8 ++++---- addons/pos_mercury/static/src/xml/pos_mercury.xml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index e0b3ea3bbb2a..6a94325cc30d 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -712,7 +712,7 @@ <t t-esc='widget.inputbuffer' /> </div> </t> - <div class='col-name' > <t t-esc='line.name' /> </div> + <div class='col-name' > <t t-esc='line.payment_method.name' /> </div> <t t-if="line && line.payment_status && ['done', 'reversed', 'reversing'].includes(line.payment_status)"> <div/> </t> @@ -729,7 +729,7 @@ <t t-if='!line.selected'> <div class='paymentline' t-att-data-cid='line.cid'> <div class='col-tendered'> <t t-esc='widget.format_currency_no_symbol(line.get_amount())' /> </div> - <div class='col-name'> <t t-esc='line.name' /> </div> + <div class='col-name'> <t t-esc='line.payment_method.name' /> </div> <t t-if="line && line.payment_status && ['done', 'reversed', 'reversing'].includes(line.payment_status)"> <div/> </t> @@ -1578,7 +1578,7 @@ <t t-name="Paymentline"> <div t-attf-class="paymentline #{line.selected ? 'selected' : ''}"> <div class='paymentline-name'> - <t t-esc="line.name"/> + <t t-esc="line.payment_method.name"/> </div> <input class='paymentline-input' t-att-type="widget.decimal_point === '.' ? 'number' : 'text'" @@ -1593,7 +1593,7 @@ <t t-name="PaymentlineOld"> <tr t-attf-class="paymentline #{line.selected ? 'selected' : ''}"> <td class="paymentline-type"> - <t t-esc="line.name"/> + <t t-esc="line.payment_method.name"/> </td> <td class="paymentline-amount pos-right-align"> <input type="number" step="0.01" t-att-value="line.get_amount_str()" /> diff --git a/addons/pos_mercury/static/src/xml/pos_mercury.xml b/addons/pos_mercury/static/src/xml/pos_mercury.xml index 782ea5973863..d0af7b8b55d1 100644 --- a/addons/pos_mercury/static/src/xml/pos_mercury.xml +++ b/addons/pos_mercury/static/src/xml/pos_mercury.xml @@ -17,11 +17,11 @@ <div>WAITING FOR SWIPE</div> </t> <t t-if="! line.mercury_swipe_pending"> - <t t-esc='line.name' /> + <t t-esc='line.payment_method.name' /> </t> </t> <t t-if="line.payment_method.is_cash_count"> - <t t-esc='line.name' /> + <t t-esc='line.payment_method.name' /> </t> </t> <!-- if there is payment status, then it is terminal paymentline, so payment-terminal class should be added. --> -- GitLab