diff options
Diffstat (limited to 'odoo/fields.py')
| -rw-r--r-- | odoo/fields.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/odoo/fields.py b/odoo/fields.py index e601dfc50d6..603e2a90a3e 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -948,6 +948,24 @@ class Field(MetaField('DummyField', (object,), {})): value = env.cache.get(record, self) except KeyError: + # behavior in case of cache miss: + # + # on a real record: + # stored -> fetch from database (computation done above) + # not stored and computed -> compute + # not stored and not computed -> default + # + # on a new record w/ origin: + # stored -> fetch from origin (computation done above) + # not stored and computed -> compute + # not stored and not computed -> default + # + # on a new record w/o origin: + # stored and computed -> compute + # stored and not computed -> new delegate or default + # not stored and computed -> compute + # not stored and not computed -> default + # if self.store and record.id: # real record: fetch from database recs = record._in_cache_without(self) |
