27e4d3bb1c33e2f070d2289833f4ba741e8d8723
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>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
Then follow the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%