I created some purchases from last year and used the real effective date of the shipment (let’s say 2025/12/31). I can see on the stock move from supplier to input zone the cost price of the products. But when I look at the products by locations view with “at date” 2025/12/31, I can see the quantity of the product but there is no cost value on the product (not even 0). The real cost value is only shown from the day when I created the shipment/stock moves. (Tryton version 7.8.3)
I would expect to see the cost value from the effective date of the stock move instead of creation date. Is this a bug or is my assumption wrong?
The cost price of a stock move is set when the move is done using the product cost price at that moment.
It could be improved with the product_cost_history module to use the historized cost if the effective date is in the past.
Now when looking at the cost value of a location for a product, it is using the cost price at the date if the product_cost_history module is activate otherwise it is using the current cost of the product.
product_cost_history is in fact activated. The cost price is from 12/12/2025 (like the effective date of the stock move) but when I look at the cost value from 31/12/2025 there is no value at all but the quantity is correct.
I tried with a new database in 7.8.5 without product_cost_history, but I see the same behavior. Before the creation date of the stock move there is no cost value in the products_by_locations view altough the effective date was before the “At date” of the view.
The history of the cost price is based on the stock move so if you have no stock move at or prior this date, the system has no history.
And the history is using the effective date of the stock moves.