From b017ab79d4ea90a294f805beba710f9f44b86073 Mon Sep 17 00:00:00 2001 From: roen-odoo Date: Mon, 21 Aug 2023 10:46:59 +0000 Subject: [PATCH] [FIX] pos_loyalty: gift card reward should not have taxes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Current behavior: When using a gift card in the PoS, you would get 2 gift card reward lines, one positive and one negative. Wich should not be the case. This happens because the gift card reward had taxes. To fix this we need to remove the taxes from the gift card reward, as it is done in the sale_loyalty module ´_get_reward_values_discount´ https://github.com/odoo/odoo/blob/30062210cc879a1d2349b888a510f29ea40d5920/addons/sale_loyalty/models/sale_order.py#L313 Steps to reproduce: - Install the pos_loyalty module - Open PoS - Buy a gift card and copy the code - Buy a product and pay with the gift card - You will see 2 gift card reward lines, one positive and one negative opw-3472830 closes odoo/odoo#133034 X-original-commit: 7814bb2663ac75ef91922897b88022d87f58241f Signed-off-by: Joseph Caburnay (jcb) Signed-off-by: Robin Engels (roen) --- addons/pos_loyalty/static/src/overrides/models/loyalty.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/pos_loyalty/static/src/overrides/models/loyalty.js b/addons/pos_loyalty/static/src/overrides/models/loyalty.js index 79501b67173..98d843405be 100644 --- a/addons/pos_loyalty/static/src/overrides/models/loyalty.js +++ b/addons/pos_loyalty/static/src/overrides/models/loyalty.js @@ -1298,6 +1298,7 @@ patch(Order.prototype, { points_cost: pointCost, reward_identifier_code: rewardCode, merge: false, + tax_ids: [], }, ]; }