Thomas Lefebvre (thle) 747b60e2c5 [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#120227

X-original-commit: b3322ecc020e027c1b71ec3a222b8c2e5d0ee97e
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-05-04 12:15:15 +02:00
2023-05-02 15:59:23 +02:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%