summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
diff options
context:
space:
mode:
authorJulien Castiaux <juc@odoo.com>2019-04-29 08:07:42 +0000
committerRaphael Collet <rco@odoo.com>2019-04-30 14:34:19 +0000
commit27e4d3bb1c33e2f070d2289833f4ba741e8d8723 (patch)
treebdeddec011eaa92dd29e080e6029c0efae4b625f /doc/reference/javascript_reference.rst
parenteb5e8d660a8e94849590537102ef4bc149c13562 (diff)
[FIX] models.py: invalid write order in inherits
Create a model and extend this model using an inherits. Define a constraint in the inherited model that uses a field of the parent model. Create a valid element using the inherited model then write an invalid value. This pass the constraint although it should raise an exception. The problem resides in the `write` function of `models.py`. It first write values on the inherited model then write values on the parent model. The order is wrong, it should write on the parent model first then on the child model. The solution is to change the order fields are written: first we update child references to their parents, then we update the parents, then we update the child. opw-1962705 closes #32919 closes odoo/odoo#33003 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'doc/reference/javascript_reference.rst')
0 files changed, 0 insertions, 0 deletions