a60ae4383575d34d5bfa12b7dd9912d8290b9367
The issue that we fix in this commit is the following: open a form view with a o2m with one required field, and the o2m is editable. When adding a new line, it is invalid (since the field with required), but when pressing ENTER, the editable list tries to navigate away, which will discard the current line (in the unselectRow method), before completing the move_to_next_line. So, at this point, the list editable create a new (empty) record, and we are back to square one, but with a visible flicker and no information on what happened. To fix this issue, we simply check that the renderer can be saved when moving to next line. If it is not (the line is invalid), then we simply abort the move. Notes: * this behaviour worked fine in list view, because the canBeSaved check is made by the saveRecord method in listController * it looks like the protection should be put into unselectRow, but this is not true (at least, in the current state): in some cases, calling unselectRow with invalid state should result in discarding the current row (in a new line in a o2m, when the record is not dirty, for example), and the list editable renderer does not know if this is the case or not. However, if the unselect action comes from a navigation event, then we want to avoid discarding the current row.
…
…
…
…
…
…
…
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.
If you are a developer you may type the following command at your terminal:
wget -O- https://raw.githubusercontent.com/odoo/odoo/master/setup/setup_dev.py | python
Then follow the developer tutorials
For Odoo employees
To add the odoo-dev remote use this command:
$ ./setup/setup_dev.py setup_git_dev
To fetch odoo merge pull requests refs use this command:
$ ./setup/setup_dev.py setup_git_review
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%