Andrea Grazioso (agr-odoo) f72968561a [FIX] sale_loyalty: cheapest product discountable
Create a Loyalty program:
- Program Type: Loyalty Cards
- Rules: 0.01 per $ spent
- Reward: 1.00 per point on cheapest product
Make a SO with total 339
Loyalty Card will get 3.39 points
Make a SO with line having
- Unit Price 140
- Tax 15%
- Total will be 161
Hit Promotions

Issue:
The system will add a discount line with unit price 5.0.
With 15% taxes applied the total discount will be 5.75
While it should be 5
Order 1, Total with tax 339 => 3.39 loyalty points
Order 2, Total with tax 161 => 1.41 loyalty points from current order
                             + 3.39 from past order
                             = 5.00 total loyalty points
When applying the discount on Order 2 the system converts 5 points to 5$,
but considering 15% tax included, the price unit of the discount line
should be 4.35

opw-3642795

closes odoo/odoo#159227

X-original-commit: 5888145b6cc27ccf0c963cf00971d386f0433a11
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2024-03-26 09:54:32 +00: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%