Comment 12 for bug 372045

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Ferdinand, here are some more precisions:

Basically I think we are discussing different kinds of valuations, and we should not mix them :-)

You are right when you say that using the current average cost of the product for computing the "value_qty_available" of past periods is not accurate. And if this is the case this should be another bug report I think.
Now from what I understand you would like to replace the average cost with a function field that computes it based on a set of stock.moves. However this cannot work currently as you are free to update the average price manually if you want, and no stock.move will correspond to that. And in fact it does not matter because we should not use the average price for anything else than knowing the current average cost of a product.
We could discuss changing this but not for v6.0, we really need to finish making it stable.

Also please note that in v6 doing a manual change of the average cost is done via a wizard that can post the corresponding Journal Entires to make sure that the GL accounts are indeed correctly representing the inventory value. So if indeed you have enabled the real-time inventory valuation, the numbers will be correct in accounting, and you have history there if you need it.

As a summary:

A. Let's not try to fit the current average product cost of a product into any kind of historical reporting at the moment, as it is not meant for it. If you need that, please use accounting entries/reports exclusively, for example through real-time inventory valuation.
And if we do have reports that use the average cost incorrectly, it's probably only to provide some estimation, and it might be better to remove this value completely.

B. Another quite important point: no, the values in accounting reports will not always match the current values displayed in the product list or in warehouse reports, because they are many factors that can make them diverge. And it's not a bug because they are not meant to be the same (at least for the moment).

I hope this explanation is clear.

If you still think there is a precision issue or error in computing either the *current* average cost *or* the GL journal entries that are posted due to real-time inventory valuation, please provide a precise explanation or patch (I'm currently working on some error cases at the moment in v6)
Otherwise please close this bug (pure housekeeping) and let's discuss your suggestions in a blueprint or another wishlist bug for a later version :-)