Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Website Attribute Set
Entity: attribute.attribute
Compute Method: _compute_field_is_searchable
| Inputs | Method | Outputs |
|---|---|---|
|
+ for rec in self: + if not rec.name or not rec.model_id: + rec.field_is_searchable = False + continue + model_obj = self.env.get(rec.model_id.model) + if model_obj is None: + rec.field_is_searchable = False + continue + field = model_obj._fields.get(rec.name) + rec.field_is_searchable = bool( + field + and (field.store or field.search or getattr(field, "sparse", None)) + ) |
|
