diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst index 7d2b3bd1ac6..3ca49846fb6 100644 --- a/doc/reference/orm.rst +++ b/doc/reference/orm.rst @@ -302,6 +302,22 @@ it uses the values of other *fields*, it should specify those fields using record.discount_value = discount record.total = record.value - discount +.. warning:: + + While it is possible to use the same compute method for multiple + fields, it is not recommended to do the same for the inverse + method. + + During the computation of the inverse, **all** fields that use + said inverse are protected, meaning that they can't be computed, + even if their value is not in the cache. + + If any of those fields is accessed and its value is not in cache, + the ORM will simply return a default value of `False` for these fields. + This means that the value of the inverse fields (other than the one + triggering the inverse method) may not give their correct value and + this will probably break the expected behavior of the inverse method. + .. _reference/fields/related: Related fields