summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorDenis Vermylen <dve@odoo.com>2017-02-09 15:29:20 +0100
committerDenis Vermylen <dve@odoo.com>2017-02-10 19:20:25 +0100
commitd3703ecb4cbd3ca4c208910c031ae2fadc4b321b (patch)
tree7d974ecfc3196bf84245ef88e11c674032b62454 /addons
parent4e2ccaa05438fd8165135b223e14413f00724454 (diff)
[IMP] models: avoid searching by id in read_group
When using read_group() and grouping by many2one fields, the many2one groupby fields get updated from an integer id to a tuple from name_get() at the end of the method. e.g.: {'user_id': 1, ...} -> {'user_id': (1, u'Administrator'), ...} To do this, it reads the many2one field by browsing on self. When self is a model with _auto = False (typically an SQL view), searching by id can be costly as the id column may not have usual properties for performance (in some cases a full computation of the table is required to look up 1 id).
Diffstat (limited to 'addons')
0 files changed, 0 insertions, 0 deletions