[FIX] models: in _create() and _write(), mark fields to recompute earlier
authorRaphael Collet <rco@openerp.com>
Thu, 9 Oct 2014 12:34:48 +0000 (14:34 +0200)
committerRaphael Collet <rco@openerp.com>
Thu, 9 Oct 2014 15:14:34 +0000 (17:14 +0200)
commitab8bd8066a15e8fd1a57ce197aed4848286c7590
treefc8044d6ecea45a0b1e10427d6dd0a0835b8c5be
parentc1d48362d3a38606ffb99d569fdc6147dcd0c775
[FIX] models: in _create() and _write(), mark fields to recompute earlier

An issue occurs when a constraint is checked before computed fields are marked
for recomputation: the constraint will read the field's current value, which
may be wrong.  If the field is marked soon enough, the constraint will trigger
the recomputation and use a correct value.
openerp/models.py