a76641cb066e46dcaa848c83a01329e841159bdb
Steps to reproduce ================== - Enable analytic accounting - Go to customer invoices - Open a record - Open studio - Click on the Invoice lines > Edit list view - Set the analytic field as required - Close studio - Create a new record - Add a new line - Click on the analytic field - Close the popup - Save the record => Even though we didn't set a value for the field, it is saved Cause of the issue ================== The actual field value is an empty object. The validity of a field is checked here [0]. An empty object is considered a truthy value. When setting the required attribute directly on the python field declaration, an empty object does not pass the check Solution ======== Add a specific check for json fields. When the value is either false (not set) or an empty object, the field is considered invalid. --- [0]: https://github.com/odoo/odoo/blob/23f01c533512cbfb33e90509e22cd3c3c4f99d40/addons/web/static/src/views/basic_relational_model.js#L284 opw-3659763 closes odoo/odoo#150677 X-original-commit: 51b538b3f678298f27bbbf458de5696706c18349 Signed-off-by: Francois Georis (fge) <fge@odoo.com> Signed-off-by: Hubert Van De Walle <huvw@odoo.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, ...
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%