odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[FW][FIX] pos_loyalty: fix buy X get Y

Open fw-bot opened this issue 6 months ago • 4 comments

When activating a loyalty program with a buy X get Y promotion. For example for buy 10 get 3, if you have 10 products in your cart and add 1 more product, it will add a reward for 1 free product. But if you add another product, the reward will stay the same, it will not give 2 free product.

Steps to reproduce:

  • Create a buy X get Y loyalty program (10 get 3 free) where X and Y are the same product.
  • Add 10 products to the cart.
  • Add 1 more product to the cart, it will add a reward for 1 free product.
  • Add another product to the cart

Observation: The reward will not change, it will still be 1 free product.

Why the fix:

If possible we will try to maximize the reward quantity. That's why we don't do it in cases where multiple rewards are possible.

opw-4762083

Forward-Port-Of: odoo/odoo#214643 Forward-Port-Of: odoo/odoo#211087

fw-bot avatar Jun 20 '25 17:06 fw-bot

Pull request status dashboard

robodoo avatar Jun 20 '25 17:06 robodoo

@robinengels @davidmonnom this PR targets master and is the last of the forward-port chain containing:

  • odoo/odoo#215276
  • odoo/odoo#215253

To merge the full chain, use

@robodoo r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

fw-bot avatar Jun 20 '25 17:06 fw-bot

@robodoo r+

robinengels avatar Jun 20 '25 17:06 robinengels

@robinengels @davidmonnom 'ci/runbot' failed on this reviewed PR.

robodoo avatar Jun 20 '25 18:06 robodoo