Odoo's Mergebot 11164423e1 [IMP] website, *: make search bar generic
Before this commit the search bar was specific to products. This generalises the search bar so it can be added to any model.

A snippet is provided, and used to replace the old search bars of blog, courses, event, forum, page and shop. The search results of these pages and the autocomplete of the search bar run through the same search mechanism.

A new hybrid results page has also been created as a target of a search on "Everything".

In each involved module, `website._get_search_details()` is implemented to return search metadata for every model related to the `search_type` parameter. Search metadata for a single model is returned by `_get_search_detail()` on that specific model.

The autocomplete runs through the additional `website._render_search_results()` pre-rendering step that prepares the data to fit in the autocomplete template.

This PR also introduces a fuzzy search mechanism: if the searched term is not found then the search is performed on a resembling term. The similarity is obtained from a Levenshtein distance combined with ratios of common and different letters.

By default the dictionary against which the search term is matched is based on the content of the search fields containing a word that starts with the first letter of the search term.

If the `pg_trgm` Postgresql extension is installed the dictionary is built from matches obtained using the `word_similarity` function.

task-2379555
odoo/upgrade#2186

closes odoo/odoo#65871

Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
2021-09-03 08:59:35 +02:00
2021-09-01 11:05:43 +00:00
…
…
…
…
2020-09-28 14:07:25 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%