[IMP] models: avoid searching by id in read_group
[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).

ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo