summaryrefslogtreecommitdiff
path: root/odoo/fields.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-31 14:37:38 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-31 14:37:38 +0200
commitcfe0523714b4244b080a268c0697f270f0b19e5b (patch)
treeec6ea86aa32afd66ff4934ee5e745652777887a3 /odoo/fields.py
parente5b19bd5aa47fdb2da547cb75de9d33a20e1e180 (diff)
parent8f21148e1a8eaae3bc09ec54377becb2361e7834 (diff)
[MERGE] forward port branch 12.0 up to 8f21148e1a8
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 0a80e52ead3..5529288d177 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):
@@ -1084,6 +1085,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: