fdd86433c65bb3bf0c5cb02e060ed10b8f67c6ed
When confirming a SO, if the costing method of a product's category is
not `Standard' and if the SO's currency is different from the company's
currency, the cost of the product won't be converted to the SO's
currency
To reproduce the error:
1. In Settings, enable:
- Margins
- Multi-Currencies
2. Create a product category PC:
- Costing Method: FIFO
3. Create a product P:
- Product Type: Storable
- Product Category: PC
- Sales Price: 200
- Cost: 100
4. Update P's quantity to 1
5. Create a pricelist PL:
- Currency: EUR
6. Create a SO:
- Pricelist: PL
- Order Lines:
- 1 x P
7. Add field "Cost" to the tree view of the order lines
- The value is correctly converted
8. Confirm the SO
Error: The cost of the order line is now 100€. This is actually the USD
cost, it should be converted
This code applies the same conversion as when the cost method is
standard:
https://github.com/odoo/odoo/blob/8a8ff03f6111f377bcd9c2b0f584c450b82a4182/addons/sale_margin/models/sale_order.py#L42-L48
OPW-2563442
closes odoo/odoo#73786
X-original-commit: 04e4cd91637c836b4d856b8638d88c5cf1770421
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
…
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%