Thomas Lefebvre (thle) f700b10ac4 [FIX] sale_loyalty: multiple discount on specific product
Steps to reproduce:

- create a coupon program with a discount type reward on specific product;
- "reward_point_mode" has to be "per unit paid";
- create a sale order;
- add a product several times;
- click on the "PROMOTIONS" button to apply promotion program.

Issue:
We calculate the amount of the discount on the total price of the product.

Expected behavior:
- If you buy 1 product at 100, you can consume 1 point,
each of which is worth 10% of the remaining amount to be paid,
so you have to pay 100 * 0.9 = 90
- If you buy 2 products at 100, you can consume 2 points,
each of which is worth 10% of the remaining amount to pay,
so you have to pay 200 * 0.9 * 0.9 = 162
- If you buy 3 products at 100, you can consume 3 points,
each of which is worth 10% of the remaining amount to be paid,
so you have to pay 300 * 0.9 * 0.9 * 0.9 = 218.7
- If you buy 4 products at 100, you can consume 4 points,
each of which is worth 10% of the remaining amount to pay,
so you have to pay 400 * 0.9 * 0.9 * 0.9 * 0.9 = 262.44
- If you buy 5 products at 100, you can consume 5 points,
each of which is worth 10% of the remaining amount to be paid,
so you have to pay 500 * 0.9 * 0.9 * 0.9 * 0.9 * 0.9 = 295.24

opw-3112925

closes odoo/odoo#110445

X-original-commit: 1a01c8470b1971dfc2b06dcce0e06fe969ac8040
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-01-20 08:40:44 +01:00
2022-12-13 17:03:17 +01:00
2023-01-03 13:16:02 +01:00
2023-01-19 18:50:06 +01:00
2023-01-03 13:16:02 +01:00
…
…
…
…
2023-01-03 13:16:02 +01:00
…
2023-01-03 13:16:02 +01: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%