Community mailing list archives

Re: odoo website search

Vauxoo S.A. de C.V., Nhomar Hernandez
- 08/31/2016 00:52:15

On Tue, Aug 30, 2016 at 10:12 PM, MD Tanzilul Hasan Khan <> wrote:
But, I want to implement search for website content or pages. Most cases I will not have webshop for the business. How can I implement such search function?

  1. There you will find how inmplement a custom "controller"
  2. That controller should receive a parameter by post./
  3. That post should have the text.
  4. Search that text into ir.ui.view (pages) where active = True and type = qweb in the field arch.
  5. Once in the controller you get the listed results get the field name and create a template which list such elements (by name)
  6. Create a view with such elements.
  7. Render the view:

I think Odoo did not have such implementetion done because they are relaying into google to maange such elements, google has an API to list such data into your website:

It is the same just that instead search on the data with api (slow) simply pass the parameters to google and render them properly.

I hope it helps.

Nhomar Hernandez
CEO Vauxoo.
Twitter: @nhomar
Odoo Gold Partner
Skype: nhomar00 (Envia mail previo no lo superviso siempre).
Móvil Venezuela:
+58 4144110269
Móvil México:
+52 1 4773933942