summaryrefslogtreecommitdiff
path: root/addons/maintenance
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2020-06-17 12:18:27 +0000
committerRaphael Collet <rco@odoo.com>2020-08-18 13:02:41 +0000
commit1f48130d2bd055835ee428a21922331d126285a3 (patch)
tree594a6dd2999a290712839dfe92df47d0f7ed42b1 /addons/maintenance
parent89963e0eddbf36d687799acb6ed1e8486cc178e7 (diff)
[REF] core: _name_search() now returns a list of ids
This provides a better API to search for records by name without the formatting part (`display_name`). This also simplifies all the overridings of `_name_search` that no longer need to call `name_get()`. The call to `name_get()` is done in method `name_search` in a generic way.
Diffstat (limited to 'addons/maintenance')
-rw-r--r--addons/maintenance/models/maintenance.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/maintenance/models/maintenance.py b/addons/maintenance/models/maintenance.py
index 8224cc52d93..fcb87179010 100644
--- a/addons/maintenance/models/maintenance.py
+++ b/addons/maintenance/models/maintenance.py
@@ -107,7 +107,7 @@ class MaintenanceEquipment(models.Model):
equipment_ids = self._search([('name', '=', name)] + args, limit=limit, access_rights_uid=name_get_uid)
if not equipment_ids:
equipment_ids = self._search([('name', operator, name)] + args, limit=limit, access_rights_uid=name_get_uid)
- return models.lazy_name_get(self.browse(equipment_ids).with_user(name_get_uid))
+ return equipment_ids
name = fields.Char('Equipment Name', required=True, translate=True)
company_id = fields.Many2one('res.company', string='Company',