Skip to content

Commit

Permalink
fixup! [MIG] pos_customer_wallet: Migration to 16.0
Browse files Browse the repository at this point in the history
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
  • Loading branch information
carmenbianca committed Sep 8, 2023
1 parent 132afcb commit 1063d58
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 48 deletions.
5 changes: 2 additions & 3 deletions pos_customer_wallet/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
"assets": {
"point_of_sale.assets": [
"pos_customer_wallet/static/src/css/pos.css",
"pos_customer_wallet/static/src/js/models.js",
"pos_customer_wallet/static/src/js/Screens/PaymentScreen/PaymentScreen.js",
"pos_customer_wallet/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml",
"pos_customer_wallet/static/src/js/**/*.js",
"pos_customer_wallet/static/src/xml/**/*.xml",
],
},
"data": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<templates id="template" xml:space="preserve">

<t
t-name="PartnerDetailsEdit"
t-inherit="point_of_sale.PartnerDetailsEdit"
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//div[hasclass('partner-details-right')]" position="inside">
<div class="partner-detail">
<span class="label">Customer Wallet</span>
<span
class="detail"
t-esc="env.pos.format_currency(props.partner.customer_wallet_balance)"
/>
</div>
</xpath>
</t>

</templates>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<templates id="template" xml:space="preserve">

<t
t-name="OrderReceipt"
t-inherit="point_of_sale.OrderReceipt"
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//div[hasclass('before-footer')]" position="before">
<div>
Customer Wallet Balance
<span
t-esc="env.pos.format_currency(receipt.customer_wallet_balance)"
class="pos-receipt-right-align"
/>
</div>
</xpath>
</t>

</templates>
45 changes: 0 additions & 45 deletions pos_customer_wallet/static/src/xml/pos.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<template id="template">
<t t-extend="PosTicket">
<!--
Customer must see his balance even if it does not use
customer wallet as a payement method for this order.
Because it's the only way he can check his balance.
-->
<t t-jquery=".receipt-change" t-operation="after">
<table class="receipt-customer-wallet-balance" t-if="receipt.client">
<tr>
<td>Customer Wallet Balance:</td>
<td class="pos-right-align">
<t
t-out="widget.format_currency(receipt.customer_wallet_balance)"
/>
</td>
</tr>
</table>
</t>
</t>

<t t-extend="XmlReceipt">
<t t-jquery=".before-footer" t-operation="before">
<line class="wallet_balance_amount" t-if="receipt.client">
<left>Customer Wallet Balance:</left>
<right><t
t-out="widget.format_currency(receipt.customer_wallet_balance)"
/></right>
</line>
</t>
</t>

<t t-extend="ClientDetails">
<t t-jquery=".client-details-right:last-child" t-operation="append">
<div
Expand All @@ -45,18 +14,4 @@
</t>
</t>

<t t-extend="ClientDetailsEdit">
<t t-jquery=".client-details-right:last-child" t-operation="append">
<div
t-attf-class='client-detail #{partner.customer_wallet_balance === undefined ? "oe_hidden" : ""}'
t-if="widget.pos.config.is_enabled_customer_wallet"
>
<span class='label'>Customer Wallet Balance</span>
<span class='detail wallet_balance'><t
t-out='widget.format_currency(partner.customer_wallet_balance) or ""'
/></span>
</div>
</t>
</t>

</template>

0 comments on commit 1063d58

Please sign in to comment.