summaryrefslogtreecommitdiff
path: root/odoo/fields.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-06-06 11:54:35 +0200
committerChristophe Simonis <chs@odoo.com>2019-06-06 11:54:35 +0200
commit71a50a2214748fec413c5a0f042d0e7172ae6ea9 (patch)
tree2e9ee11551350e23923390d9c53baf630b6ed834 /odoo/fields.py
parenta7621137cb0d75ec545152d5e1d413c9d3548e45 (diff)
parent409679866b2ee8352a8cb27460e7332563526924 (diff)
[MERGE] forward port branch saas-12.3 up to 409679866b2
Diffstat (limited to 'odoo/fields.py')
-rw-r--r--odoo/fields.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/odoo/fields.py b/odoo/fields.py
index 857a942bdb2..cde78d4b180 100644
--- a/odoo/fields.py
+++ b/odoo/fields.py
@@ -116,8 +116,8 @@ class Field(MetaField('DummyField', (object,), {})):
:param required: whether the value of the field is required (boolean, by
default ``False``)
- :param index: whether the field is indexed in database (boolean, by
- default ``False``)
+ :param index: whether the field is indexed in database. Note: no effect
+ on non-stored and virtual fields. (boolean, by default ``False``)
:param default: the default value for the field; this is either a static
value, or a function taking a recordset and returning a value; use
@@ -640,6 +640,7 @@ class Field(MetaField('DummyField', (object,), {})):
_related_help = property(attrgetter('help'))
_related_groups = property(attrgetter('groups'))
_related_group_operator = property(attrgetter('group_operator'))
+ _related_context_dependent = property(attrgetter('context_dependent'))
@property
def base_field(self):
@@ -1090,6 +1091,8 @@ class Field(MetaField('DummyField', (object,), {})):
recs = record._recompute_check(self)
if recs:
# recompute the value (only in cache)
+ if self.recursive:
+ recs = record
self.compute_value(recs)
# HACK: if result is in the wrong cache, copy values
if recs.env != env: