Community mailing list archives

Implementing a product search drop-down in eCommerce V8

Willow IT, Jon Wilson
- 10/04/2015 19:41:25
We are trying to implement a search drop down suggestion list on an Odoo website for a client. I've been successful in doing so when a session is active (when someone is logged in). However, this does not work when the website is accessed without a login, and the javascript throws the following error when I type something in the search input:

"Server application error Object {message: "Odoo Session Expired", code: 100, data: Object}"

The above happens when I use the .call() function in javascript to call python code.

I can't use the .call() function without passing in a session as it always throws the following error:

"Uncaught Error: Not session specified"

I've also tried using the .query() function but it always comes up with the error.

"Model does not have any function query()"

I have tried using both openerp.Model and openerp.web.Model, however, both don't seem to work.

We are thinking of by-passing the Odoo framework altogether and writing our own little server to access just that one table. But we may be missing something obvious.

Jonathan Wilson
ph: +61 3 8506 0393
mob: +61 4 000 17 444
2013 & 2015 Odoo Best Partner Asia/Pacific
Creators of  Odoo-Pentaho integration project