-
- Downloads
[FIX] sale_loyalty: correct display coupon points
Steps to reproduce:
- install website_sale and website_sale_loyalty;
- activate Payment Providers Demo and Wire Transfer;
- put them in 'test mode';
- go to ecommerce;
- add a gift card;
- process the checkout.
Issue:
Depending on the configuration of the payment acquirer used,
sometimes the amount displayed is doubled
(in the display of the gift card amount
after the payment process in brackets).
- Demo in test mode: amount will be doubled
- Wire Transfer in test mode: amount will not be doubled
Remark:
The amounts are correct in the backend.
Cause:
Sometimes the `action_confirm` function is used and sometimes it is not.
When you enter it, the points of the coupon are already set.
Therefore, we add the amount again in the `_get_real_points_for_coupon`.
Solution:
Display the information of the gift card only
when the sale order is validated.
Therefore, there is no need to bypass (with `post_confirm`)
to add the points that will be valid when the sale order is confirmed.
Because with the display correction, we won't see the points.
opw-3166164
closes odoo/odoo#113246
Signed-off-by:
Lefebvre Thomas (thle) <thle@odoo.com>
Loading
Please register or sign in to comment