On large recordsets I got some severe performance issues while browsing through an inherits relation.
For example I have a batch process exporting a csv file with products variants:

I have to export 50.000 products.

If I do :
`variant.categ_id` It takes a very long time to get the result.

If I do:
`variant.product_tmpl_id.categ_id` The result is immediate

The problem is that the global perfomance of the application is impacted by this problem.

For example my POS takes more than 15 minutes to load. Because I have 26.000 products and the compute price method uses a lot browsing through the inherits such like `product.cated_id`, `product.uom_id` and they all takes a huge time to compute.

Same issue in this case.

If I do :
`variant.price` It takes a very long time to get the result.

If I do:
`variant.product_tmpl_id.price` The result is immediate

Could you help me ?


Simple way to reproduce:

1/ Create a new database and install sale module
2/ Launch following script through odoo shell :

```python
# -*- coding: utf-8 -*-
import logging

_logger = logging.getLogger(__name__)
self = self  # noqa

nb_product = 50000

i = 0
while i < nb_product:
    prod = self.env['product.template'].create({'name': 'product_%s' % i})
    i += 1
    if i % 1000 == 0:
        self.env.cr.commit()
        _logger.info("%s Products Created" % i)
```

2/ Launch following script through odoo shell :
```python
# -*- coding: utf-8 -*-
import logging

_logger = logging.getLogger(__name__)
self = self  # noqa


products = self.env['product.product'].search([])

for product in products:
    # Immediate response
    _logger.info('Category Template %s' % product.product_tmpl_id.categ_id)
    # Lagging response
    _logger.info('Category Variant %s' % product.categ_id) 
    break
```
self._cr.execute('CREATE TABLE "%s" (id SERIAL NOT NULL, PRIMARY KEY(id))' % (self._table,))
        self._cr.execute("COMMENT ON TABLE \"%s\" IS %%s" % self._table, (self._description,))
        _schema.debug("Table '%s': created", self._table)
    @api.model_cr
    def _parent_columns_exist(self):
        query = """ SELECT c.relname FROM pg_class c, pg_attribute a
                    WHERE c.relname=%s AND a.attname=%s AND c.oid=a.attrelid """
        self._cr.execute(query, (self._table, 'parent_left'))
        return self._cr.rowcount
    @api.model_cr
    def _create_parent_columns(self):
        self._cr.execute('ALTER TABLE "%s" ADD COLUMN "parent_left" INTEGER' % (self._table,))
        self._cr.execute('ALTER TABLE "%s" ADD COLUMN "parent_right" INTEGER' % (self._table,))
        if 'parent_left' not in self._fields:
            _logger.error("add a field parent_left on model %s: parent_left = fields.Integer('Left Parent', index=True)", self._name)
            _schema.debug("Table '%s': added column '%s' with definition=%s", self._table, 'parent_left', 'INTEGER')
        elif not self._fields['parent_left'].index:
            _logger.error('parent_left field on model %s must be indexed! Add index=True to the field definition)', self._name)
        if 'parent_right' not in self._fields:
            _logger.error("add a field parent_right on model %s: parent_right = fields.Integer('Left Parent', index=True)", self._name)
            _schema.debug("Table '%s': added column '%s' with definition=%s", self._table, 'parent_right', 'INTEGER')
        elif not self._fields['parent_right'].index:
            _logger.error("parent_right field on model %s must be indexed! Add index=True to the field definition)", self._name)
        if self._fields[self._parent_name].ondelete not in ('cascade', 'restrict'):
            _logger.error("The field %s on model %s must be set as ondelete='cascade' or 'restrict'", self._parent_name, self._name)
        self._cr.commit()
    @api.model_cr
    def _select_column_data(self):