Wednesday, May 28, 2025
2 changes · saas-17.4
Resolved issues and error corrections
Point of Sale now applies the selected Buy X Get Y reward correctly when several rewards use the same product. This prevents incorrect quantity increases on the original order line and ensures the chosen reward appears as expected, matching sales order behavior.
Original PR description
In Point of sale "Buy X Get Y" promotion program may offer multiple rewards that can be selected manually. However, in this case the promotion is applied inconsistently with respect to the same…
In Point of sale "Buy X Get Y" promotion program may offer multiple rewards that can be selected manually.
However, in this case the promotion is applied inconsistently with respect to the same promotion on a sales order
Steps to reproduce:
- Have a promo program like follows:
- Program Type: Buy X Get Y
- Condition 1:
- Minimum quantity: 12
- Grant: 1 credit per order
- Product: [PRODUCT]
- Condition 2:
- Minimum quantity: 14
- Grant: 2 credit per order
- Product: [PRODUCT]
- Reward 1:
- In exchange of: 1 credit
- Product: [PRODUCT]
- Quantity rewarded: 1
- Reward 2:
- In exchange of: 2 credit
- Product: [PRODUCT]
- Quantity rewarded: 2
- Description: "PRODUCT x2"
- Open POS Session
- Add [Product]
- Via Numpad change quantity to 14
- Click Reward button
- Select "PRODUCT x2"
Issue:
Existing POS order line quantity is raised from 14 to 17. No reward line is added to the order.
Cause:
This occurs because:
1. The reward quantity is not correctly computed in case of multi-quantity reward
2. The reward is selected based on the reward product, so in case of multiple reward with the same product, we should apply the reward with the correct quantity
opw-4563825
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prMexican point-of-sale refunds can now be processed correctly when the original sale included a discount. This prevents valid refund transactions from being blocked because discount lines have the opposite sign from regular product lines.
Original PR description
**Problem:** When making a refund of a product that has a discount in mexico, an error will be raised, preventing the refund. This error states that all the refund's lines should have a negative price. This didn't take discounts into account, as a discount normally has a negative price, so it should have a positive one when refunding it. **Steps to reproduce:** - Choose a Mexican company. - Make a discount for a product. - Go to PoS and purchase that product. - Make a refund for this product. - The payment won't go through as some lines are positive. **Why the fix:** The code didn't take the fact that a discount line should be positive in the context of a refund. So it checked that no lines were positive, and threw the error if one was found. The new fix only throws this error if the total is positive in the context of a refund, as it is done in the context of a pruchase if the total is negative. opw-4783049