[IMP] fields: update inverse fields lazily for performance
authorRaphael Collet <rco@openerp.com>
Tue, 2 Sep 2014 10:02:23 +0000 (12:02 +0200)
committerRaphael Collet <rco@openerp.com>
Tue, 2 Sep 2014 12:07:03 +0000 (14:07 +0200)
commite7b8e107f1cf9270cceac628cba9019e31069667
treed715c855b314d849b49044915f6bba602439195b
parent4a1029582390164a74cf3594662dc61d8562aedf
[IMP] fields: update inverse fields lazily for performance

When a relational field is assigned in an onchange, its inverse field is
updated in cache.  Reading the current value of the inverse field may be
costly, for instance in the case of a one2many field with thousands of records
as a value.  Instead, put in cache a SpecialValue that reads and updates the
field; it will be triggered only when it is accessed.
openerp/fields.py