Commit Graph
10 Commits
Author SHA1 Message Date
Géry Debongnie ecceee639e [FIX] web: formview dialog can now properly evaluate context
For this change, I had to pass the handle to the parent datapoint all
the way from the controller to the new form view.
2017-04-11 19:44:38 +02:00
Géry Debongnie ed830f7394 [FIX] web: don't select cell in one2many (non editable)
The code for selectCell was active, when the user clicked on a td.  No
test caught that, because we simulated a click on a tr, not on a td.

I guess that the lesson of the story is that our tests should be as
close as possible to the real conditions, so we should simulate the
click on the innermost element.
2017-04-11 19:44:38 +02:00
Géry Debongnie fdd34465ac [FIX] web: one2many with inline formview and invalid fields
Before this commit, the form view opened by a one2many did not check
that the required fields were properly set, so it could lead to pretty
strange results.
2017-04-11 19:44:38 +02:00
Géry Debongnie db2198b7ef [FIX] web: fix crash when building domain with dates
Before this commit, the rawify function assumed that any object is
necessary a record object.  This was true until recently, when we
decided that dates should be internally stored as a moment instance.
2017-04-11 19:44:38 +02:00
Géry Debongnie fdcab23759 [FIX] web: fix crashes with various views and date/datetimes
The problem was that in some cases, the date/datetime values were not
properly parsed when they enter the system.
2017-04-11 19:44:38 +02:00
qsm-odoo cd6bba33c2 [IMP] web: auto-context for fields model RPC calls
Some fields need to do some model RPC calls (name_search, name_create,
...). Before this commit, they did not use the performModelRPC method
but an explicit trigger_up so that the BasicController (the
FieldManagerMixin) catches it and ask the BasicModel to perform the
RPC. This was designed to let the BasicModel handle the context.

This commit makes the context be automatically binded without the need
to explicitely call the BasicModel for each route in the
FieldManagerMixin. It also ensures that the field own context is
properly merged with the user/action/search contexts.

Now, the fields use the performModelRPC method and the
FieldManagerMixin catches the associated "call_service" event. Then, it
can get the full context from the BasicModel instance and let the event
continue its propagation. To know which field context has to be fetched,
the performModelRPC method is overriden by AbstractField to
automatically add the dataPointID and the field name in the options
parameter.
2017-04-11 19:44:38 +02:00
qsm-odoo 7e91154e8e [IMP] web: some more linting to follow guidelines 2017-04-11 19:44:38 +02:00
Géry Debongnie 05ec284e9c [FIX] web: properly compute field values for onchanges 2017-04-11 19:44:38 +02:00
Géry Debongnie 450e2f4d48 [FIX] web: basicmodel can evaluate context for new records 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