Adrien Widart (awt) f512f8a650 [FIX] purchase_stock: compute pdiff based on bill date
Multi-currency setup. On a bill, if the bill date and the accounting
date are not the same, there will be some errors in the stock
valuation.

To reproduce the issue:
(Company in USD)
1. Enable EUR, with specific rates:
   - Today: 100 EUR = 150 USD
   - One day ago: 100 EUR = 130 USD
   - Two days ago: 100 EUR = 125 USD
2. Create an auto-avco storable product P
3. Confirm a PO with 1 x P at 100 EUR
4. Receive the product
5. Bill it:
   - Bill date: two days ago
   - Accounting date: one day ago
6. Open the inventory valuation

Error: a price diff layer has been created, which makes sense, but
its value is incorrect: -20 USD. It should be -25 USD.

When computing the price difference, we use the bill value at
accounting date (130 USD). This is incorrect, it should be based on
the bill date (125 USD).

OPW-3544318

closes odoo/odoo#144649

X-original-commit: 2d3d01594e09297f74d657c0ab3a0181e3754dc5
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-12-04 10:21:34 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +00:00
2023-12-01 19:25:36 +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%