From e8da98a3ee788e53e0a45ff7205055dfb7aac8d7 Mon Sep 17 00:00:00 2001 From: "Jacky (trj)" Date: Mon, 10 Oct 2022 13:29:29 +0000 Subject: [PATCH] [FIX] pos_loyalty: better labeling ewallet in partner screen Since this balance column is used for different things (e.g. total due), adding a label allows to properly differentiate what is what. closes odoo/odoo#105139 X-original-commit: 4aeeceea50ca41ce3ad18950632744bee9ce1a6e Related: odoo/enterprise#33696 Signed-off-by: Heinz Robin (rhe) Signed-off-by: Trinh Jacky (trj) --- addons/pos_loyalty/static/src/js/PartnerLine.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/pos_loyalty/static/src/js/PartnerLine.js b/addons/pos_loyalty/static/src/js/PartnerLine.js index 50f13e5fe5a..20442d7f296 100644 --- a/addons/pos_loyalty/static/src/js/PartnerLine.js +++ b/addons/pos_loyalty/static/src/js/PartnerLine.js @@ -8,6 +8,9 @@ odoo.define('pos_loyalty.PartnerLine', function (require) { class extends PartnerLine { _getLoyaltyPointsRepr(loyaltyCard) { const program = this.env.pos.program_by_id[loyaltyCard.program_id]; + if (program.program_type === 'ewallet') { + return `${program.name}: ${this.env.pos.format_currency(loyaltyCard.balance)}`; + } const balanceRepr = this.env.pos.format_pr(loyaltyCard.balance, 0.01); if (program.portal_visible) { return `${balanceRepr} ${program.portal_point_name}`;