Commit Graph
5 Commits
Author SHA1 Message Date
Géry Debongnie da4e653695 [FIX] web: various fixes for date and datetime in client
The field_utils date method have been modified recently, and the idea
behind those changes is that the BasicModel keeps at all time a moment
instance as its internal representation of a date or datetime.

But the parse and format methods did not properly support unset dates,
so we have to slighlty change them to support the case where their values is
not set.
2017-04-11 19:44:38 +02:00
Géry Debongnie 064d7f4621 [FIX] web: make focus tests works if window has not the focus
Until now, those tests failed if the window did not have the focus. We
solve the issue with 2 different fixes:
* instead of checking that the focus property is set, we can check the
activeElement instead, it seems to work.
* instead of calling the focus method, in some tests, we can trigger a
* 'focusin' event.  I don't know why this works, but it does.

Note that this might make the tests work in phantomjs
2017-04-11 19:44:38 +02:00
Christophe Matthieu 3c0190d0a6 [IMP] web: use moment object instead of string for date
Before this commit, the odoo web client used strings to represent dates.

Now, the date is parsed into a moment object when the value is read from the
server side. The widget formats the object to display the value. When the
widget value changes, the value is parsed to a moment object. The value is
automatically formatted to server value in ajax calls (toJSON method).
2017-04-11 19:44:38 +02:00
qsm-odoo 92f24f2cfe [IMP] web: adapt field domain to new API
Add the implementation of the "FieldDomain" (widget='domain') in
basic fields file.
2017-04-11 19:44:38 +02:00
Géry Debongnie 905e01921f [REF] web, *: redesign all JS views
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
2017-04-11 19:44:38 +02:00