[FIX] pos_loyalty: display "enter code" correctly

Current behavior:
When you only used the "Next order coupons" loyalty program, the "enter
code" button was not displayed.

Steps to reproduce:
- Install the pos_loyalty module
- Archive all the loyalty programs
- Create a loyalty program with "Next order coupons" as reward
- Open a PoS session

opw-3608894

closes odoo/odoo#147101

X-original-commit: 55ad2020e4b56a2ce525959f0c021b83198446bc
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
This commit is contained in:
roen-odoo
2023-12-21 17:24:59 +00:00
parent 47ff920f57
commit 7c577fd34d
@@ -34,7 +34,7 @@ ProductScreen.addControlButton({
component: PromoCodeButton,
condition: function () {
return this.pos.programs.some((p) =>
["coupons", "promotion", "gift_card", "promo_code"].includes(p.program_type)
["coupons", "promotion", "gift_card", "promo_code", "next_order_coupons"].includes(p.program_type)
);
},
});