Commit 3500e1fb authored by Xavier Morel's avatar Xavier Morel

[imp] shortcut search_read to not perform a read (and an additional RPC...

[imp] shortcut search_read to not perform a read (and an additional RPC roundtrip) if search got no results
parent 4c94fc30
......@@ -394,6 +394,7 @@ class Model(object):
:return: A list of dictionaries containing all the specified fields.
"""
record_ids = self.search(domain or [], offset, limit or False, order or False, context or {})
if not record_ids: return []
records = self.read(record_ids, fields or [], context or {})
return records
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment