|
This commit introduce a full redesign of all JS views. We started
basically from scratch. The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.
Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented
We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.
Work done by the framework team: mostly aab, ged, chm, dmo, qsm
|
|
(1) The priority widget is based on a selection field.
So, this priority widget must support string values.
Before this commit, the widget worked correctly with numeric values.
For example: '0', '1', '2', '3' was converted to 0, 1, 2, 3.
But sometimes, we have non-numerical values.
For example: 'Normal', 'Low', 'High', 'Very High'.
In this case, we can not compare the elements to each other according to their values.
If you select 'High', we don't know if the star of the value 'Low' must be filled.
To fix this, we base the comparison on the indexes of the table of possible values.
For example:
[('A', 'A'), ('B', 'B'), ('C', 'C'), ('D', 'D')]
Now, if you select D, we know that A (with index 0) is smaller than D (with index 3).
This could be a behavioral change if you had [('1', '1'), ('0', '0'), ('2', '2')]
(2) When the selection field had no value, the 'o_form_field_empty' class was added.
In this case, the stars must be displayed without being filled.
|