summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorodooqs <sum1201@gmail.com>2020-01-16 08:00:42 +0000
committerPierre Masereel <pim@odoo.com>2020-01-21 09:00:07 +0000
commit279d3ce00b712d5bb14a3e4554ddac627e08de7a (patch)
tree0dc130dd60429581f207f56b9c5de9756e97c394
parente18ac0963afffd1808984dba971ff186c56e6883 (diff)
[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>
-rw-r--r--addons/point_of_sale/static/src/xml/pos.xml8
-rw-r--r--addons/pos_mercury/static/src/xml/pos_mercury.xml4
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 e0b3ea3bbb2..6a94325cc30 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 &amp;&amp; line.payment_status &amp;&amp; ['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 &amp;&amp; line.payment_status &amp;&amp; ['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 782ea597386..d0af7b8b55d 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. -->