diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-08-10 16:17:28 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-08-10 16:17:28 +0200 |
| commit | dde62073baf5a0cc45678e4504fe2f54ccffcf18 (patch) | |
| tree | a9db807928a2ae01488df77582efae3785658bf1 /odoo/fields.py | |
| parent | 3e54d9b56d1cb9b61c72b6990a6a313ef566101e (diff) | |
| parent | a2361e23ea95c308ac7576c614c0a1938707def0 (diff) | |
[MERGE] forward port branch saas-14 up to a2361e23ea9
Diffstat (limited to 'odoo/fields.py')
| -rw-r--r-- | odoo/fields.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/odoo/fields.py b/odoo/fields.py index 2b289227f9f..cc88137deb4 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -555,7 +555,7 @@ class Field(object): """ Traverse the fields of the related field `self` except for the last one, and return it as a pair `(last_record, last_field)`. """ for name in self.related[:-1]: - record = record[name][:1] + record = record[name][:1].with_prefetch(record._prefetch) return record, self.related_field def _compute_related(self, records): @@ -1020,6 +1020,7 @@ class Field(object): self.compute_value(record) else: recs = record._in_cache_without(self) + recs = recs.with_prefetch(record._prefetch) self.compute_value(recs) else: |
