Skip to content
Snippets Groups Projects
Commit 279d3ce0 authored by odooqs's avatar odooqs Committed by Pierre Masereel
Browse files

[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: default avatarpimodoo <pimodoo@users.noreply.github.com>
parent e18ac096
No related branches found
No related tags found
No related merge requests found
...@@ -712,7 +712,7 @@ ...@@ -712,7 +712,7 @@
<t t-esc='widget.inputbuffer' /> <t t-esc='widget.inputbuffer' />
</div> </div>
</t> </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 &amp;&amp; line.payment_status &amp;&amp; ['done', 'reversed', 'reversing'].includes(line.payment_status)"> <t t-if="line &amp;&amp; line.payment_status &amp;&amp; ['done', 'reversed', 'reversing'].includes(line.payment_status)">
<div/> <div/>
</t> </t>
...@@ -729,7 +729,7 @@ ...@@ -729,7 +729,7 @@
<t t-if='!line.selected'> <t t-if='!line.selected'>
<div class='paymentline' t-att-data-cid='line.cid'> <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-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 &amp;&amp; line.payment_status &amp;&amp; ['done', 'reversed', 'reversing'].includes(line.payment_status)"> <t t-if="line &amp;&amp; line.payment_status &amp;&amp; ['done', 'reversed', 'reversing'].includes(line.payment_status)">
<div/> <div/>
</t> </t>
...@@ -1578,7 +1578,7 @@ ...@@ -1578,7 +1578,7 @@
<t t-name="Paymentline"> <t t-name="Paymentline">
<div t-attf-class="paymentline #{line.selected ? 'selected' : ''}"> <div t-attf-class="paymentline #{line.selected ? 'selected' : ''}">
<div class='paymentline-name'> <div class='paymentline-name'>
<t t-esc="line.name"/> <t t-esc="line.payment_method.name"/>
</div> </div>
<input class='paymentline-input' <input class='paymentline-input'
t-att-type="widget.decimal_point === '.' ? 'number' : 'text'" t-att-type="widget.decimal_point === '.' ? 'number' : 'text'"
...@@ -1593,7 +1593,7 @@ ...@@ -1593,7 +1593,7 @@
<t t-name="PaymentlineOld"> <t t-name="PaymentlineOld">
<tr t-attf-class="paymentline #{line.selected ? 'selected' : ''}"> <tr t-attf-class="paymentline #{line.selected ? 'selected' : ''}">
<td class="paymentline-type"> <td class="paymentline-type">
<t t-esc="line.name"/> <t t-esc="line.payment_method.name"/>
</td> </td>
<td class="paymentline-amount pos-right-align"> <td class="paymentline-amount pos-right-align">
<input type="number" step="0.01" t-att-value="line.get_amount_str()" /> <input type="number" step="0.01" t-att-value="line.get_amount_str()" />
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
<div>WAITING FOR SWIPE</div> <div>WAITING FOR SWIPE</div>
</t> </t>
<t t-if="! line.mercury_swipe_pending"> <t t-if="! line.mercury_swipe_pending">
<t t-esc='line.name' /> <t t-esc='line.payment_method.name' />
</t> </t>
</t> </t>
<t t-if="line.payment_method.is_cash_count"> <t t-if="line.payment_method.is_cash_count">
<t t-esc='line.name' /> <t t-esc='line.payment_method.name' />
</t> </t>
</t> </t>
<!-- if there is payment status, then it is terminal paymentline, so payment-terminal class should be added. --> <!-- if there is payment status, then it is terminal paymentline, so payment-terminal class should be added. -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment