← Back to team overview

openerp-india team mailing list archive

[Bug 1004442] Re: [Trunk/6.1] stock: erroneous help message on product stock levels

 

** Tags added: usability

-- 
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/1004442

Title:
  [Trunk/6.1] stock: erroneous help message on product stock levels

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  in the stock module, the help string for qty_available says:

  """
  Current quantity of products.
  In a context with a single Stock Location, this includes goods stored at this Location, or any of its children.
  In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.
  In a context with a single Shop, this includes goods stored in the Stock Location of the Warehouse of this Shop, or any of its children.
  Otherwise, this includes goods stored in any Stock Location typed as 'internal'
  """

  The "Otherwise" part is wrong.

  The code run in that case selects all stock locations of all
  warehouses in the database:

          else:
              location_ids = []
              wids = warehouse_obj.search(cr, uid, [], context=context)
              for w in warehouse_obj.browse(cr, uid, wids, context=context):
                  location_ids.append(w.lot_stock_id.id)

  I'm not sure what the fix for this should be : updating the code or
  fixing the help string. I'm inclined to think that fixing the help
  message  is the least surprise path (although what I need in my
  current project is what is described in that help tooltip...)

  To reproduce the bug:

  * on an instance create two warehouses
  * on the first warehouse, set the stock location to an internal location
  * on the second warehouse, set the stock location to something else than internal (eg inventory)
  * add a third internal location, not linked to any warehouse
  * add some stock level in all 3 locations for a product
  * display the product view without any context: you should per the help see only the stock from location 1 and 3, yet you get the stock from location 1 and 2.

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


References