Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Improved Name Search
Entity: ir.model
Compute Method: _compute_smart_search_warning
| Inputs | Method | Outputs |
|---|---|---|
|
- msgs = [] - for rec in self: - if len(rec.name_search_ids) > 4: - msgs.append( - "You have selected more than 4 fields for smart search, " - "fewerer fields is recommended" - ) - if any(x.translate for x in rec.name_search_ids): - msgs.append( - "You have selected translatable fields in the smart search," - " try to avoid them if possible" - ) - # rec.smart_search_warning = msg - if msgs: - rec.smart_search_warning = ( - "<p>In case of performance issues we recommend to review " - "these suggestions: <ul>%s</ul></p>" - ) % "".join(["<li>%s</li>" % x for x in msgs]) - else: - rec.smart_search_warning = False |
|
