← Back to team overview

openerp-india team mailing list archive

[Bug 1095577] Re: [7.0] create new product from menu -> IndexError: pop from empty list

 

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

** 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/1095577

Title:
  [7.0] create new product from menu -> IndexError: pop from empty list

Status in OpenERP Addons (modules):
  New

Bug description:
  Version 7.0
  Rev : 8516
  Multicompany

  There are no products yet in the second company and we want to start
  created them.

  Trying to open from the menu : Sales > Products > Products

  This traceback pops up instantly :

    File "/home/agaplan/openerp/web/addons/web/session.py", line 87, in send
      return openerp.netsvc.dispatch_rpc(service_name, method, args)
    File "/home/agaplan/openerp/server/openerp/netsvc.py", line 289, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "/home/agaplan/openerp/server/openerp/service/web_services.py", line 614, in dispatch
      res = fn(db, uid, *params)
    File "/home/agaplan/openerp/server/openerp/osv/osv.py", line 169, in execute_kw
      return self.execute(db, uid, obj, method, *args, **kw or {})
    File "/home/agaplan/openerp/server/openerp/osv/osv.py", line 123, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/agaplan/openerp/server/openerp/osv/osv.py", line 179, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/agaplan/openerp/server/openerp/osv/osv.py", line 166, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/agaplan/openerp/server/openerp/osv/orm.py", line 3606, in read
      result = self._read_flat(cr, user, select, fields, context, load)
    File "/home/agaplan/openerp/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/agaplan/openerp/server/openerp/osv/fields.py", line 1122, in get
      result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
    File "/home/agaplan/openerp/addons/stock/product.py", line 356, in _product_available
      stock = self.get_product_available(cr, uid, ids, context=c)
    File "/home/agaplan/openerp/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/agaplan/openerp/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/agaplan/openerp/server/openerp/osv/orm.py", line 4845, in _search
      query = self._where_calc(cr, user, args, context=context)
    File "/home/agaplan/openerp/server/openerp/osv/orm.py", line 4678, in _where_calc
      where_clause, where_params = e.to_sql()
    File "/home/agaplan/openerp/server/openerp/osv/expression.py", line 1213, in to_sql
      q2 = stack.pop()
  IndexError: pop from empty list

  Peter

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


References