openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #24009
[Bug 1155773] [NEW] In multi-company : products in invoices are not searchable
Public bug reported:
Let consider the following setup :
* load the default DB with demo datas
* add a company C, child of the main company
* add a user U employee of C configured to only one-allowed company, and having "Invoices and payments" rights;
When the user wants to create a new invoice, when adding invoice lines, products can be auto-completed
(typing "hdd", will give [EXT-HDD] External Hard disk).
But if, rather than starting typing words, the user click "search more..." in the product dialog, he gets the error :
"IndexError: pop from empty list".
regards,
Marc
Complete stack trace :
Client Traceback (most recent call last):
File "/opt/openerp/web/addons/web/http.py", line 195, in dispatch
response["result"] = method(self, **self.params)
File "/opt/openerp/web/addons/web/controllers/main.py", line 1004, in search_read
return self.do_search_read(req, model, fields, offset, limit, domain, sort)
File "/opt/openerp/web/addons/web/controllers/main.py", line 1039, in do_search_read
records = Model.read(ids, fields or False, req.context)
File "/opt/openerp/web/addons/web/session.py", line 43, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/opt/openerp/web/addons/web/session.py", line 31, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/opt/openerp/web/addons/web/session.py", line 104, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
File "/opt/openerp/web/addons/web/session.py", line 90, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/netsvc.py", line 289, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/service/web_services.py", line 614, in dispatch
res = fn(db, uid, *params)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/osv.py", line 169, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/osv.py", line 123, in wrapper
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/osv.py", line 179, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/osv.py", line 166, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/orm.py", line 3606, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/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 "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/fields.py", line 1131, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/opt/openerp/addons/stock/product.py", line 356, in _product_available
stock = self.get_product_available(cr, uid, ids, context=c)
File "/opt/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 "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/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 "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/orm.py", line 4845, in _search
query = self._where_calc(cr, user, args, context=context)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/orm.py", line 4678, in _where_calc
where_clause, where_params = e.to_sql()
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/expression.py", line 1213, in to_sql
q2 = stack.pop()
IndexError: pop from empty list
** Affects: openobject-server
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1155773
Title:
In multi-company : products in invoices are not searchable
Status in OpenERP Server:
New
Bug description:
Let consider the following setup :
* load the default DB with demo datas
* add a company C, child of the main company
* add a user U employee of C configured to only one-allowed company, and having "Invoices and payments" rights;
When the user wants to create a new invoice, when adding invoice lines, products can be auto-completed
(typing "hdd", will give [EXT-HDD] External Hard disk).
But if, rather than starting typing words, the user click "search more..." in the product dialog, he gets the error :
"IndexError: pop from empty list".
regards,
Marc
Complete stack trace :
Client Traceback (most recent call last):
File "/opt/openerp/web/addons/web/http.py", line 195, in dispatch
response["result"] = method(self, **self.params)
File "/opt/openerp/web/addons/web/controllers/main.py", line 1004, in search_read
return self.do_search_read(req, model, fields, offset, limit, domain, sort)
File "/opt/openerp/web/addons/web/controllers/main.py", line 1039, in do_search_read
records = Model.read(ids, fields or False, req.context)
File "/opt/openerp/web/addons/web/session.py", line 43, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/opt/openerp/web/addons/web/session.py", line 31, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/opt/openerp/web/addons/web/session.py", line 104, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
File "/opt/openerp/web/addons/web/session.py", line 90, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/netsvc.py", line 289, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/service/web_services.py", line 614, in dispatch
res = fn(db, uid, *params)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/osv.py", line 169, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/osv.py", line 123, in wrapper
return f(self, dbname, *args, **kwargs)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/osv.py", line 179, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/osv.py", line 166, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/orm.py", line 3606, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/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 "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/fields.py", line 1131, in get
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
File "/opt/openerp/addons/stock/product.py", line 356, in _product_available
stock = self.get_product_available(cr, uid, ids, context=c)
File "/opt/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 "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/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 "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/orm.py", line 4845, in _search
query = self._where_calc(cr, user, args, context=context)
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/openerp/osv/orm.py", line 4678, in _where_calc
where_clause, where_params = e.to_sql()
File "/opt/openerp/env/local/lib/python2.7/site-packages/openerp-7.0-py2.7.egg/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-server/+bug/1155773/+subscriptions
Follow ups
References