Files
Odoo-18.0-20251222/base_search_fuzzy/hooks.py
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

15 lines
510 B
Python
Executable File

# Copyright 2016 Eficent Business and IT Consulting Services S.L.
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2017 LasLabs Inc.
# Copyright 2021 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.osv import expression
from odoo.tools.sql import SQL
def post_load():
"""Patch expression generators to enable the fuzzy search operator."""
expression.TERM_OPERATORS += ("%",)
expression.SQL_OPERATORS.update({"%": SQL("%%")})