You buy a product for 5€ on 15/01/2023 and then you buy the same product for 10€ on 15/04/2023.
If you want to see an inventory based on date 15/01/2023, you will want to see the cost value on that date (5€/u. in this example), not the cost value taking into account the moves it had after that date.
The information they want to see is by location and not by products, that’s why they don’t use product_cost_history in that case.
If you do not activate the product_cost_history module the cost value will be computed using the last cost price of the product. If you want to have the cost at a specific date, you need to activate the product_cost_history module.
Activating the module will afect the behaviour of both product and location views.
On the product form, it is always the average cost price that is displayed because there are no other possible value.
What you must check is the cost price on the outgoing move, it should be the correct one.
The cost price on the outgoing move is correct and I agree.
The problem is that on the product form having product_cost_history activated is not showing the average cost price, but showing the cost price from the last unit that was out, in the case I exposed is 5€.
So with this example, on 18/04/2023 having 1 unit at 10€/u, if you move out this unit you will have in the inventory cost price: 10€ and that is not correct.
The cost price is set with average when there are units in stock that there are in different unit prices and I agree that’s right.
But also when a product is set as FIFO, when for example you have:
10 units in at 10€
10 units in at 11€
You will have as a cost price: 20 units at 10,50€
In this moment is used the average computation and it’s okay.
When 10 units are out, the cost price on the product will be 11€ instead of the average because all the units that were in at 10€ are gone.
So when the cost price stored on the product is 11€ on this example, it also has to be 11€ when you consult the inventory. But currently, we found that is set as 10€ because it takes the unit price from the last move was out and that’s what isn’t correct.