Files
odoo_source/addons/test_website/models/website.py
T
Florian Charlier 70dbae8a01 [REF] website, *: make _search_get_details extensible
* = test_website, website_blog, website_event, website_forum, website_sale,
website_slides

`_search_get_details` extension in other modules can now be performed with
fewer lines of code by updating a search type-to-model mapping, without the
need for method override.

This will also have the benefit of slightly reducing the call stack length,
avoiding some unnecessary `if` statements and list lookups at runtime.

Task-2957361

closes odoo/odoo#98423

Related: odoo/enterprise#30946
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-01 11:32:25 +02:00

7 lines
211 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.website.models.website import SEARCH_TYPE_MODELS
SEARCH_TYPE_MODELS['test'] |= 'test.model',