← Back to team overview

openerp-india team mailing list archive

[Bug 1091765] Re: [trunk] pop from empty list

 

*** This bug is a duplicate of bug 921561 ***
    https://bugs.launchpad.net/bugs/921561

** Project changed: openobject-server => openobject-addons

** This bug has been marked a duplicate of bug 921561
   Product function fields should return 0 when no locations are defined

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

Title:
  [trunk] pop from empty list

Status in OpenERP Addons (modules):
  New

Bug description:
  On a new database:
  I have created a new company (company 2) with parent_id = "Your company"
  I have created a new user with company_id=company2 and company_ids=[company2]

  Install sale and purchase module (setup configurations).

  
  When I'm logged with the new user and I click on product menu I have this error:


  OpenERP Server Error
  Client Traceback (most recent call last):
    File "/home/alexandre/openerp/last_trunk/web/addons/web/http.py", line 195, in dispatch
      response["result"] = method(self, **self.params)
    File "/home/alexandre/openerp/last_trunk/web/addons/web/controllers/main.py", line 1006, in search_read
      return self.do_search_read(req, model, fields, offset, limit, domain, sort)
    File "/home/alexandre/openerp/last_trunk/web/addons/web/controllers/main.py", line 1041, in do_search_read
      records = Model.read(ids, fields or False, req.context)
    File "/home/alexandre/openerp/last_trunk/web/addons/web/session.py", line 40, in proxy
      result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
    File "/home/alexandre/openerp/last_trunk/web/addons/web/session.py", line 28, in proxy_method
      result = self.session.send(self.service_name, method, *args)
    File "/home/alexandre/openerp/last_trunk/web/addons/web/session.py", line 101, in send
      raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)

  
  Server Traceback (most recent call last):
    File "/home/alexandre/openerp/last_trunk/web/addons/web/session.py", line 87, in send
      return openerp.netsvc.dispatch_rpc(service_name, method, args)
    File "/home/alexandre/openerp/last_trunk/server/openerp/netsvc.py", line 281, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "/home/alexandre/openerp/last_trunk/server/openerp/service/web_services.py", line 603, in dispatch
      res = fn(db, uid, *params)
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/osv.py", line 169, in execute_kw
      return self.execute(db, uid, obj, method, *args, **kw or {})
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/osv.py", line 123, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/osv.py", line 179, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/osv.py", line 166, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/orm.py", line 3606, in read
      result = self._read_flat(cr, user, select, fields, context, load)
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/orm.py", line 3714, in _read_flat
      res2 = self._columns[val[0]].get(cr, self, ids, val, user, context=context, values=res)
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/fields.py", line 1122, in get
      result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
    File "/home/alexandre/openerp/last_trunk/addons/stock/product.py", line 352, in _product_available
      stock = self.get_product_available(cr, uid, ids, context=c)
    File "/home/alexandre/openerp/last_trunk/addons/stock/product.py", line 243, in get_product_available
      child_location_ids = location_obj.search(cr, uid, [('location_id', 'child_of', location_ids)])
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/orm.py", line 2356, in search
      return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/orm.py", line 4845, in _search
      query = self._where_calc(cr, user, args, context=context)
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/orm.py", line 4678, in _where_calc
      where_clause, where_params = e.to_sql()
    File "/home/alexandre/openerp/last_trunk/server/openerp/osv/expression.py", line 1213, in to_sql
      q2 = stack.pop()
  IndexError: pop from empty list

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


References