← Back to team overview

openerp-community-reviewer team mailing list archive

[Bug 915568] Re: Wrong dates used when confirming stock inventory

 

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

-- 
You received this bug notification because you are a member of Stock and
Logistic Core Editors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/915568

Title:
  Wrong dates used when confirming stock inventory

Status in OpenERP Community Backports (Addons):
  Confirmed
Status in New OpenERP WMS:
  Won't Fix
Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  [ Problem ]
  action_confirm method is not taking in account "date" from stock.inventory object, and update qtys in the moment of confirmation.
  The inventory date is taken into account when querying the stock to compute the inventory difference but the stock moves are created at the wrong date, making the stock and virtual stock wrong at the date of the inventory.

  Users expect that the inventory date should say _when_ the inventory
  was taken - in this way the amount to correct should effective before
  this date.

  Attached videos gives better explanation, and document with kardex
  expected.

  [ Impact ] the available quantity and virtual stock are wrong near the
  date of the inventory.

  [ Possible fixes ]
  - The preferred fix would be to write the stock moves at the date of the inventory.
  - A less-than-ideal fix would be to not take the inventory date is taken into account when querying the stock to compute the inventory difference. For the moment is the way v8 is being developed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ocb-addons/+bug/915568/+subscriptions


Follow ups