← Back to team overview

openerp-india team mailing list archive

[Bug 1045334] [NEW] import inventory

 

Public bug reported:

Hello,

We discovered a bug in the wizard "Import Inventary" (openobject-
addons/stock/wizard/stock_fill_inventory.py). The wizard does not take
in account the case when a move has the same source and destination
location.

Scenario :

1) Create a product.
2) Create a stock.move with quantity = 15, source location = supplier and dest location = stock and validate it
3) Create a stock.move with quantity = 10, source location = stock and dest location = stock and validate it
4) Create a stock.move with quantity = 5, source location = stock and dest location = customer and validate it

The final stock for this product should be 15 - (10 + 10) - 5 = 10, but
the "Import Inventory" gives a result of 20.

This is because the test 
    if move.location_dest_id.id == move.location_id.id: 
        continue # ?
is never done and the wizard simply check if the dest location is stock, and if it is, it adds the quantity

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1045334

Title:
  import inventory

Status in OpenERP Addons (modules):
  New

Bug description:
  Hello,

  We discovered a bug in the wizard "Import Inventary" (openobject-
  addons/stock/wizard/stock_fill_inventory.py). The wizard does not take
  in account the case when a move has the same source and destination
  location.

  Scenario :

  1) Create a product.
  2) Create a stock.move with quantity = 15, source location = supplier and dest location = stock and validate it
  3) Create a stock.move with quantity = 10, source location = stock and dest location = stock and validate it
  4) Create a stock.move with quantity = 5, source location = stock and dest location = customer and validate it

  The final stock for this product should be 15 - (10 + 10) - 5 = 10,
  but the "Import Inventory" gives a result of 20.

  This is because the test 
      if move.location_dest_id.id == move.location_id.id: 
          continue # ?
  is never done and the wizard simply check if the dest location is stock, and if it is, it adds the quantity

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


Follow ups

References