The account_stock_continental module allows to update manually the cost price with the wizard wizard_update_cost_price.
But you can also call the "wizard_recompute_cost_price" after and that will erase the previous updated cost price.
Problem:
The account_stock_continental create account moves with difference between the recomputed cost price and the asked cost price (wizard).
If you recompute the cost price after this, the account stock value is not correct.
Solution:
Forbid to use "wizard_recompute_cost_price" if there are no stock move since the "wizard_update_cost_price" execution.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
This is not a solution.
The cost price change should be stored in such way that the re-compute will reuse the information at the right time.
But on another side, I'm wondering if both wizard should not merge in such way that if the method if average, the only value allowed is this result for the update of the cost price. Or maybe it is simpler to forbid to use update wizard if the method is average and that the recompute wizard run the update wizard to make the update.
Example :
Current product cost price : 1,5€
Recompute product cost price : 2€ (landing cost integration)
Product cost price difference : 0,5€
Value to be posted to the stock account via the counterpart account: 0,5 € * Qty in stock
Currently the wizard "update_cost_price" only ask the new cost price but
does not take the current cost price to compare it to the cost price calculated by the method "recompute"
> Or maybe it is simpler to forbid to use update wizard if the method is average
With the average cost method, it must be possible to perform a manual price change
because we can imagine the need to integrate additional costs on a product
but that we can not impact a delivery.
Example:
We have received different delivery, so we have 1000 products in stock.
Due to a storage problem, we must apply a treatment on these products before being able
to sell them (for example cleaning). We must impact these costs in the cost price and in the stock account.
For this we recalculate a new cost price manually and we use the wizard to apply this difference.
We can not use the notion of "landed cost" in this case,
because the costs must be impacted on all the stock and not on a delivery.
So to be able to have a single wizard, we need to stop requesting stock account for the move. For that, I think we should simplify the account_stock* fields. I think we should have only:
Also I think the wizard when run on multiple product should just ignore the "manual cost" products. And when run on a single product which is a "manual cost" product, it ask for the new cost.