This commit improves the use of mail activities by allowing their
integration with the calendar. Activity types now have a category
field that can be used to trigger some specific behavior. First
specific behavior is to have activity types of meeting category.
Creating activities of this type trigger a jump to the calendar to
schedule the meeting. Meeting activities and calender events are
linked to be able to easily navigate through the document, its activities
and its meetings.
Configuration is done using a category on activity types instead of some
hardcoded "meeting" activity to avoid issues with master data and to be
able to choose which activity type should trigger this behavior.
If the option 'event_open_popup' is set to true, then the calendar view will open events (or records) in a FormViewDialog. Otherwise, it will open events in a new form view (with a do_action)
Since the new views merge, a lot of design elements were broken. This
was particularly impacting the fields in the editable list view; indeed
the editable list view is not using an inline form view anymore so the
fields in the list were not properly styled as the LESS was still
defined assuming the form view environment (for example the invalid
fields were red for o2m fields in form view but not in editable list
view even though they got the right CSS class).
This commit refactor the LESS following these rules:
- No more division of non-layout and layout rules. Dividing LESS rules
in x_layout.less and x.less was a mistake. Many rules can be
considered to be layout and not layout at the same time, developers
always have to switch from one file part to the other, many CSS
selectors (and rules!) are duplicated for nothing, ...
- Field style is extracted from x_view.less and put in the new
fields.less file. As before, the fields_extra.less will contain the
rules specific to community so that the enterprise repo can override
those by replacing the whole file.
- Many classes have been renamed so that o_form_x_y becomes o_x_y as
many classes can now be applied outside of form view. These classes
should not be used in templates anyway.
The commit also changes the DOM of fields so that it is more minimalist
(no useless parent div, etc).
Input elements are not automatically styled anymore, they have to get
the o_input class explicitely. This allows to fix lots of small style
bugs of previous versions (required monetary field had not the proper
style, readonly m2m tags appeared as editable, ...). This also improves
the LESS code.
The editable list view should also completely stop flickering on chrome
and firefox.
The commit also removes the orange outline on list view dirty cells.
The commit also removes deprecated static xml, LESS and other code.
Notice there are still styles to restore/fix and LESS to improve.
The RPC system was not completely satisfactory, we decided to prepare
the future and do it properly. This commit introduces the new rpc
system, which replace the previous new one. We now simply have a
method, this._rpc, which takes a dictionary of parameters. The idea is
that depending on the parameters, it is able to add correct default
value when necessary.
For situations where we don't have the this._rpc method, we can use the
rpc.query method, which takes the same arguments, but directly calls
ajax.rpc instead of triggering up some events.
The new views and widgets (at least some of them) first landed
in web_studio (v10), and they we moved later to web, so changes
in web_studio need to be applied in web.
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
Before this patch, add_filter was called 2 times.
Once when we select a partner in the drop down, we trigger a onchange value
to change from false to the partner id.
Once to reset to false the value after the first add_filter()
This commit closes#9758
Basicaly, do this RPC once, at webclient startup, to get the next notification.
Do the RPC again when the notification is displayed to get the next one.
When an event with alarm is created, edited or removed, trigger an event on the
bus for all involved users (the attendees) with an update of their next
calendar notification.
Since the new QWeb engine, `groups` directives on template
rendered in a route with auth=none is simply ignored, since
all is done as SUPERUSER_ID, it was impossible to instanciate
the webclient to check if the session is valid and to display
meeting info or redirect to event form view.
It seems that we don't want to fix this because routes auth=none
are rare, and special. So it is not considered as a bug.
The fix for calendar is, however, to do redirection or template
rendering server side.
Also:
- keeps unticked filters unticked when deleting a filter or adding a new one
- correctly tick filters when clicking on the partner's name (that code was
broken)
- remove reference to instance.web introduced by a forwardport
- wrong use of self in CalendarView's init()
When loading a calendar view with a partner_id in the context, the sidebar's
filters should be disabled by default to only display events related to that
partner.
Before this rev., the events were loaded twice:
- once with the date range as domain (and optionally the content of the search
view),
- once with the date range and the partner_ids of the sidebar's filters (and
content of search view).
The first loading was therefore useless, and might also be very costly.
For Manufacturing and Repairs, replace the gavel by a wrench. A gavel is a small hammer used by a judge; it is not used in manufacturing. Keep it for when we will have a Law app.
For POS, replace the briefcase by a screen:
For timesheet, replace the calendar by a clock:
For calendar, use the calendar:
For event, use a ticket, it's more generic than a martini glass:
Before the fix dda8e2211a, the duplicate
records were erased thanks to the index used in the dictionary(id of the partner).
After this fix, to avoid this this problem, the label of each record is used as
key in the dictionary.
When accepting/declining a calendar event invitation received by mail,
we landed on an empty gray webclient. The confirmation page had been
dropped with passage to new JS API / new calendar / new webclient.
Previous mechanism had been reimplemented: custom web client with event
information/confirmation if the user is not connected or redirection to
the event form view if the user is connected.
+ FIX manyattendeetag : the status circle did not turn red when an
user declined the invitation.
By extending the Notification widget to create the CalendarNotification one,
we override the events key of Notification defining the handler when clicking
on the close cross. So when clicking on the cross, it doesn't close the
notification, and it even toggle the app switcher since the preventDefault
isn't performed.
Note that this should be directly handled by the webclient itself, and its
mechanism of extending widgets. This should be done in current master.
when mode is switched m2o should be reinitialized, and old instance of
field manager should be destroyed otherwise it will through traceback
'cannot call methods on autocomplete prior to initialization', also
improved the reload_favorite_list, it should be called when
calendar.contacts record is created
- Contact filters were dropped with the new design
- The 'me' filter was not working correctly (wrong colors)
- Remove some useless/unnecessary code
- Use new API confirm dialogs
- Convert CSS to LESS
for compatibility with the enterprise edition.
Also add type=button as the type attribute should always be specified for the
<button> element (different browsers may use different default types).
The module system needs to know the dependencies of a given module
before executing the function. This is why the dependencies were
defined once in an array, and then were described one more times in the
call to require.
But a trick can simplify this: the boot function can parse the string
representation of the module and extract the calls to require from it.
It is more work for the processor, but it leads to simpler module
definitions.