[FIX] models: in method onchange(), check for record dirtiness only on *2many fiels
authorRaphael Collet <rco@openerp.com>
Wed, 10 Sep 2014 10:10:22 +0000 (12:10 +0200)
committerRaphael Collet <rco@openerp.com>
Wed, 10 Sep 2014 12:26:12 +0000 (14:26 +0200)
commitad14acab3237c26861469fcde25dd73291e633e2
tree04822cd03b84d787f22f8270b6df3ea5446a536b
parent13bd2eaa3e11ca6b26deb5590c0e13e7ff08de15
[FIX] models: in method onchange(), check for record dirtiness only on *2many fiels

Cascading onchanges can be caused by a related field computed in cache.  This
causes a bug in sale order lines, were setting the uom field forces reading
product fields, which are inherited from product templates.  The inherited
fields are computed as related fields, which marks the product record as dirty.
This subsequently triggers an onchange on the product field, which resets the
uom field!
openerp/models.py