Comment 27 for bug 915568

Revision history for this message
qdp (OpenERP) (qdp) wrote :

Well, what i meant was "unfortunately, it's not _currently_ working that way and we did't modify it in trunk-wms". Stock moves are done at current time, and to be honest, i don't know exactly how possible it would be to have them done at a past date, as we didn't study this case yet.

I can forecast it would make some troubles with any removal strategy you have: imagine you manage your stock in FIFO, have received lot 1 on the 1st of month, lot 2 on the 2nd of the month, made a transfer of the 5th and now want to encode a transfer on the 4th? what if the stock move with a past date should create a negative quant? what to do in case of real time valuation, if the accounting period is closed? what if the costs were different...

I don't think it's impossible though, but these questions should be answered first.

For the inventories in trunk-wms branch, the problem is also that currently we compute the theoretical _current_ level of stock of products and compare it to what to user encoded. So here we would need to change by computing the stock level at the inventory date (but i would avoid making a huge SQL query on all the stock moves. Maybe a union of quants minus stock move done in between today and the inventory date would preserve the efficiency of the computation).

That was for the next gen of WMS, but it may be much more easier to solve for v7... I may be blind but i don't see any corner case it would imply in v7. The only thing is: it's a new feature and could be refused in the official v7. And i don't want any complain about regression in v8 because we changed it in v7 but not in trunk-wms :-) We need be be consistent

My message was almost posted when i thought: a lot of problem may be avoided if we allow to post inventory at past date ONLY if there isn't new stock move done in between the inventory date and today, for the given filter(s) (locations, products....). Then it's ok to take the current level of stock, we just post the move at a past date and make the valuation at that date too.

Anyway, i'm open to discussion