odoo-dev/odoo — pull request #21 by rco-odoo (2014-07-04 07:26:38+00:00)
Title: [FIX] fields: when not in onchange, do not update inverse field in cache

When executing an onchange method, setting a relational field should update the
corresponding inverse field, so that values look consistent for the programmer.
However, we should not do this in general when computing field values, since it
may introduces access to the computed field before it is computed.

Consider a related many2one field which an inverse one2many field. While
computing the field's value, the one2many would be updated, which would trigger
reading the current value of the one2many, which requires the corresponding
many2one field. This fails when the one2many is read for several records, and
some of those records have not been computed yet.