Impossible to access product when in multicompany for child company admin

Bug #995910 reported by Antoine(OpenERP)
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenERP Addons (project parking)
Confirmed
Medium
Unassigned

Bug Description

Working on 6.1 server. Problem appears on web and gtk client.

Create a DB without demo data, create 1 company, child of the main company. Create also 2 additional users, each one responsible and linked to one company.

Try to access the product list view with the admin of the child company -> bug:

Environment Information :
System : Linux-3.0.0-17-generic-i686-with-Ubuntu-11.10-oneiric
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
Operating System Release : 3.0.0-17-generic
Operating System Version : #30-Ubuntu SMP Thu Mar 8 17:34:21 UTC 2012
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF-8
Python Version : 2.7.2+
OpenERP-Client Version : 6.1.1
Last revision No. & ID :2058 launchpad_translations_on_behalf_of_openerp-20120418091309-h2j9kxghuoa867f2
Traceback (most recent call last):
  File "/home/antoine/source/server/6.1/openerp/wsgi/core.py", line 79, in xmlrpc_return
    result = openerp.netsvc.dispatch_rpc(service, method, params)
  File "/home/antoine/source/server/6.1/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/antoine/source/server/6.1/openerp/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/home/antoine/source/server/6.1/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/antoine/source/server/6.1/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/antoine/source/addons/6.1/audittrail/audittrail.py", line 495, in execute_cr
    return fct_src(cr, uid, model, method, *args)
  File "/home/antoine/source/server/6.1/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/antoine/source/server/6.1/openerp/osv/orm.py", line 3406, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/antoine/source/server/6.1/openerp/osv/orm.py", line 3517, in _read_flat
    res2 = self._columns[val[0]].get(cr, self, ids, val, user, context=context, values=res)
  File "/home/antoine/source/server/6.1/openerp/osv/fields.py", line 1132, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/home/antoine/source/addons/6.1/stock/product.py", line 328, in _product_available
    stock = self.get_product_available(cr, uid, ids, context=c)
  File "/home/antoine/source/addons/6.1/stock/product.py", line 222, in get_product_available
    child_location_ids = location_obj.search(cr, uid, [('location_id', 'child_of', location_ids)])
  File "/home/antoine/source/server/6.1/openerp/osv/orm.py", line 2241, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/home/antoine/source/server/6.1/openerp/osv/orm.py", line 4571, in _search
    query = self._where_calc(cr, user, args, context=context)
  File "/home/antoine/source/server/6.1/openerp/osv/orm.py", line 4422, in _where_calc
    where_clause, where_params = e.to_sql()
  File "/home/antoine/source/server/6.1/openerp/osv/expression.py", line 795, in to_sql
    q2 = stack.pop()
IndexError: pop from empty list

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
awu-openerp (awu) wrote :

Same goes for Kanban view.

Revision history for this message
ajay javiya (OpenERP) (aja-openerp) wrote :

Hello,
We have traced the issue out end and found that their are two cases :
1) Configuration Issue as Child company Warehouse Missing, If we add Warehouse for the company, It work perfect.
2) Technically while calculating field : qty_available, virtual_available, incoming_qty and outgoing_qty if their is no warehouse then it has to be handelled from addons.

and Their is already similar bug is posted (Bug lp#921561) and assigned to "OpenERP R&D Addons Team 2". So We are setting this bug as Duplicate.
Thank You.

Changed in openobject-server:
assignee: OpenERP's Framework R&D (openerp-dev-framework) → nobody
affects: openobject-server → openerp-addons
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.