Skip to content
Snippets Groups Projects
Commit a378f6ca authored by tau's avatar tau
Browse files

[FIX] pos_loyalty: Fix loyalty points for new customer


Currently if a customer makes an order with a new loyalty card, the
Balance on the PartnerListScreen does not show the balance for the new
loyalty card
We need to refresh the page

Now, the Balance will show the new loyalty card balance without
refreshing the page

opw-3332436

closes odoo/odoo#122221

Signed-off-by: default avatarHeinz Robin (rhe) <rhe@odoo.com>
parent 7ea1cba5
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,8 @@ export const PosLoyaltyPaymentScreen = (PaymentScreen) =>
} else {
dbCoupon = new PosLoyaltyCard(
couponUpdate.code, couponUpdate.id, couponUpdate.program_id, couponUpdate.partner_id, couponUpdate.points);
this.env.pos.partnerId2CouponIds[partner.id] = this.env.pos.partnerId2CouponIds[partner.id] || new Set();
this.env.pos.partnerId2CouponIds[partner.id].add(couponUpdate.id);
}
delete this.env.pos.couponCache[couponUpdate.old_id];
this.env.pos.couponCache[couponUpdate.id] = dbCoupon;
......
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