From c2b82c89a522f76ae70dfdda33a57b7320ebbcd9 Mon Sep 17 00:00:00 2001 From: "Maruan Aguerdouh (magm)" Date: Fri, 17 Feb 2023 15:10:09 +0000 Subject: [PATCH] [FIX] pos_loyalty: enter code button now displayed with discount codes Steps to reproduce: - Install pos, pos_loyalty, sales and activate the discounts and coupons - Create a Discount code for the POS. - Go to the POS see panel of buttons. Issue: Having discount codes in active won't trigger the button for enter the code to be activated. Solution: We added the discount codes (`promo_code`) to the part in `PromoCodeButton.js` that handles when we display the button. opw-3193426 closes odoo/odoo#113646 X-original-commit: 200cf4ffa2e18498fdda62c51f7016cf0172e273 Signed-off-by: Trinh Jacky (trj) Signed-off-by: Maruan Aguerdouh Mohtar (magm) --- .../pos_loyalty/static/src/js/ControlButtons/PromoCodeButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/pos_loyalty/static/src/js/ControlButtons/PromoCodeButton.js b/addons/pos_loyalty/static/src/js/ControlButtons/PromoCodeButton.js index 19d5e3a2a1a..84dca1bdd14 100644 --- a/addons/pos_loyalty/static/src/js/ControlButtons/PromoCodeButton.js +++ b/addons/pos_loyalty/static/src/js/ControlButtons/PromoCodeButton.js @@ -32,7 +32,7 @@ ProductScreen.addControlButton({ component: PromoCodeButton, condition: function () { return this.env.pos.programs.some((p) => - ["coupons", "promotion", "gift_card"].includes(p.program_type) + ["coupons", "promotion", "gift_card", "promo_code"].includes(p.program_type) ); }, });