-
- Downloads
[FIX] website_sale: compute price with discounts and pricelists
When combining two pricelists, the unit price might be incorrect
To reproduce the error:
1. In Settings, enable:
- Pricelists (Advanced)
- Discounts
2. Create a product P:
- Sales Price: $100
- Available on website
3. Edit the Public Pricelist:
- Add a price rule:
- Apply On product P
- Min. Quantity: SuperProduct
- Compute Price: Percentage
- Percentage Price: 63%
- Discount Policy: Included in the price
4. Create a second pricelist:
- Add a price rule:
- Apply on product P
- Compute Price: Formula
- Based on: Other Pricelist
- Other Pricelist: Public Pricelist
- Price Discount: 25%
- E-commerce Promotional Code: PROMO
- Discount Policy: Show public price & discount
5. On the website, add P to the cart
6. Edit the cart:
- P's quantity: 500
- Apply PROMO code
Error: The new price is $75 instead of $27.75
`_website_product_id_change` already returns the correct price value, so
the latter shouldn't be computed again (moreover,
`_fix_tax_included_price_company` should use the price with the pricelists
applied instead of the default product price)
OPW-2605804
closes odoo/odoo#75371
Signed-off-by:
Adrien Widart <adwid@users.noreply.github.com>
Part-of: odoo/odoo#78570
Loading
Please register or sign in to comment