Skip to content
Snippets Groups Projects
user avatar
Laurent Desausoi (lade) authored
When using a pricelist with a currency different than the one
of the product, the prices used in the pricelist (surcharge, min_margin,
& max_margin) are using the default currency of the company which is invalid.

To reproduce the issue:
1. Enable multiple currency and enable a second one with an exagerated rate for the sake of clarity.
2. Create a formula pricelist with the newly activated currency using either surcharge or the margin.
3. Create a SO with a standard product. By switching between pricelist, you will see an invalid price.
E.G.:
        EUR_rates = 2 compared to USD        PRICELIST = surcharge of 10€ on any product
        PRODUCT_price = 300$      PRODUCT_price_euros = 150€
        CURRENT_SO_price = (300 + 10)/rate_EUR = (300 + 10)/2 = 155€
        EXPECTED_SO_price = (300 + 10*rate_EUR)/rate_EUR = (300 + 10*2)/2 = 160€

Solution:
Convert the pricelist item margin & surcharges to the base price currency.
To do so, the needed currency conversion date is given through the context.

opw-2760720

closes odoo/odoo#87018

Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
b7ec0a2e
History

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