8c38baee8526b725536eac6b6dee04aca92a4aad
x_
The `api.constrains` `_check_name` on `ir.model.fields` ensures users do not create custom fields not starting with `x_`. It offers a user-friendly message when users try to do that. However, this `api.constrains` can be bypassed, for instance when updating the field name through raw SQL. This revision aims to no longer load custom fields if they do not starts with `x_`. In addition, it replaces the Python constraint with an SQL constraint in order to have a stronger constraint. Following bugs or unexpected flows, people were able to add custom fields not starting with `x_` with the `api.constrains` alone. Adding the SQL constraint will tighten the constraint. However, even without that SQL constraint, for instance if users drop the SQL constraint manually, custom field not starting by `x_` must not be loaded. A user would be able to drop that constraint through a SQL shell or a `cr.execute` in a server action. This is to prevent users to override class attributes. closes odoo/odoo#127702 Related: odoo/upgrade#4908
…
…
…
…
…
…
…
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, ...
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.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%