Andrea Grazioso (agr-odoo) a660e8ab3e [FIX] purchase_stock: price difference currency conversion date
Have a product P configured with:
* Product Type: Storable Product
* Product category:
    * costing method: standard
    * Inventory Valuation Automated
    * Price Difference Account: "500000 Cost of Goods Sold"
* Cost $100

Activate Multicurrency:
* USD main currency, CZK foreign currency
* On CZK set the rates
    * date1, Unit per USD: 30
    * date2, Unit per USD: 25 (date2 > date1)
    * date3, Unit per USD: 26 (date3 > date2)

Create a purchase order:
* Date: date2
* Currency: CZK
* Order line:
    * Product P
    * Quantity 10
    * Unit price 3000
Confirm, receive product on date2 (svl needs to be in date2)
Create the vendor bill with:
* Bill date: date 1
* Accounting date: date 3
Confirm the bill

Issue

Check the bill journal items. Price difference account is debited with 4000 czk.
This amount is not correct.
The valuation layer price unit is 100$
At the receipt date the price unit should be 2500czk
The price unit difference 3000-2500 = 500czk
Price difference 500*10 = 5000czk
The issue occur because the price difference unit is converted at bill
accounting date, resulting in 4000czk

opw-3063809

closes odoo/odoo#111199

X-original-commit: bbc0b003f6ff08a50196e07b66083ee7e8896150
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-27 14:03:32 +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%