[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) <trj@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
This commit is contained in:
Maruan Aguerdouh (magm)
2023-02-27 11:47:07 +01:00
parent 0d5b9d2030
commit c2b82c89a5
@@ -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)
);
},
});