Commit Graph
72 Commits
Author SHA1 Message Date
Akash Bhavsar 9568b1525b [IMP] mail, calendar: integrate meeting activities with calendar
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.
2017-09-07 17:55:57 +02:00
Christophe Matthieu 9500f8d3f7 [IMP] web: add 'event_open_popup' option on calendar view
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)
2017-05-04 17:19:25 +02:00
qsm-odoo 250e716c3a [REF] web, *: restore views design
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.
2017-05-04 12:07:30 +02:00
Martin Geubelle e4ac74450f [FIX] web, calendar: reintroduce many2manyattendee fields widget
This widget behaviour hadn't been correctly implemented with the new views.
This commit also introduces some tests.
2017-04-27 16:56:47 +02:00
Géry Debongnie 2106e3dd2e [REF] web, *: simplify our RPC system (in JS)
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.
2017-04-11 19:44:38 +02:00
Géry Debongnie 86a87aa8b0 [REF] *: use _rpc method for all rpcs
The _rpc method is now the preferred method to do a rpc, so we need to
update all calls.
2017-04-11 19:44:38 +02:00
Aaron Bohy 2e540eb3c1 [FIX] *: apply changes from web_studio
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.
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
Richard Mathot 5099856064 [FIX] calendar: display filter "[Me]" before others
The previous code actually returned the filter whose partner_id was the
lowest one (using '_.first' on an object that is not an array is quite clunky)
2017-01-04 12:09:57 +01:00
Kishan Gajjar ef9c07b0ef [IMP] calendar: remove create and edit from the calendar 2016-11-09 13:10:13 +01:00
Christophe Simonis f670b3b1df [MERGE] forward port branch saas-11 up to 3aea814 2016-07-29 15:33:51 +02:00
Christophe Simonis 73cc3611b4 [MERGE] forward port branch 9.0 up to d35f425 2016-07-28 12:31:29 +02:00
Christophe Simonis d35f4250cc [MERGE] forward port branch saas-6 up to 7079a0b 2016-07-28 12:22:03 +02:00
Christophe Simonis 7079a0be30 [MERGE] forward port branch 8.0 up to 8ceb943 2016-07-27 18:13:51 +02:00
Jeremy Kersten 077dde3a69 [FIX] calendar: don't duplicate all the calendar_contact
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
2016-07-26 13:35:11 +02:00
Aaron Bohy 488e9f299d [IMP] calendar: remove /calendar/notify RPC done every 5 minutes
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.
2016-06-27 15:30:45 +02:00
Jérome Maes cfb8e8700a [FIX] calendar: view meeting detail when not logged
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.
2016-06-20 16:19:32 +02:00
Aaron Bohy 2e29f388c5 [FIX] calendar,pos,web: show_application should return a deferred
Also remove unused options dict from WebClient (especially action_post_login)
2016-06-16 13:48:18 +02:00
Jainik Patel eda051f43d [REM] web: Remove GTK icons and replace them by Font-awesome 2016-06-13 12:04:17 +02:00
Aaron Bohy 99bfb46fa5 [REF] (web_)calendar: mainly sidebar refactoring
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()
2016-06-02 12:37:41 +02:00
Aaron Bohy 9f3fff5181 [IMP] calendar: sidebar filters: disable filters if active partner
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.
2016-06-02 12:37:41 +02:00
Aaron Bohy 42929b9acd [IMP] calendar: sidebar filters: avoid duplicating contacts
by blacklisting contacts already in favorites in the Many2One
2016-06-02 12:37:41 +02:00
Aaron Bohy 2705a6785b [FIX] calendar: sidebar filters: no many2one if !useContacts
Also don't allow to delete the filters in that case, as they are automatically
computed from the displayed events.
2016-06-02 12:37:41 +02:00
Aaron Bohy 1ff03029a0 [IMP] calendar: sidebar filters: remove unnecessary RPCs 2016-06-02 12:37:41 +02:00
Aaron Bohy dc06e9d515 [FIX] (web_)calendar: load events with attendees in domain
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.
2016-06-02 12:37:41 +02:00
Yannick Tivisse a7e57d6d1a [IMP] Appswitcher: Better icons for some modules
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:
2016-05-25 13:12:53 +02:00
Christophe Simonis fac4cc7006 [MERGE] forward port of branch saas-9 up to f8e6bb7 2016-05-24 13:19:19 +02:00
Aaron Bohy 252bd47f94 [FIX] calendar: don't block UI on slow /calendar/notify
Safe imp for a stable version. Better fix could be to send notifications
through the bus, but this would be in master.
2016-05-18 09:52:41 +02:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
Nicolas Lempereur 924c2dee21 [FIX] {web_,}calendar: order contact sidebar
In 22051dc, the sidebar contacts of the calendar were ordered, this does
it in another way to solve several issues when selecting filters.
2016-02-11 16:34:33 +01:00
Goffin Simon 22051dcc1b [FIX] calendar: To avoid duplicate contacts
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.
2016-02-10 19:53:58 +01:00
Goffin Simon dda8e2211a [FIX] calendar: order of calendar contacts
When displaying calendar contacts in calendar view, the contacts
have to be ordered by name.

opw:666397
2016-02-05 16:17:53 +01:00
qsm-odoo c81e2720b2 [FIX] web,calendar: m2m attendee tag color
The colors for attendee tags were not used and were reset for all tags
each time the color was changed for a single tag.
2016-01-19 14:37:51 +01:00
Mohammed Shekha 06a3609ac8 [FIX]calendar: use display_name instead of name, because of template change, now FieldMany2ManyTag uses display_name to show lable on tag 2016-01-12 10:13:43 +01:00
qsm-odoo bba2e39fb8 [FIX] calendar: redirection after invitation email
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.
2015-11-27 16:20:32 +01:00
Aaron Bohy 7730a8deae [FIX] calendar: reminder notifications: event's handlers
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.
2015-10-14 10:49:17 +02:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +02:00
Olivier Dony 43a12e99bd [FIX] calendar: filter events by attendees when sidebar is used with useContacts
Add some missing deferred chains + change domain for loading calendar.events.
2015-09-17 13:57:04 +02:00
qsm-odoo 40fcfcb822 [FIX] calendar: tag template data
Tag template data were wrong since many2manytag color introduction
2015-09-11 17:50:38 +02:00
Mohammed Shekha 6534e2f203 [FIX] web_calendar: Destroy m2o when events are reloaded
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
2015-08-31 12:11:46 +02:00
qsm-odoo 82e166bb6f [FIX] (web_)calendar: Refresh code + Filters
- 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
2015-07-29 15:00:06 +02:00
qsm-odoo 22bb892b80 [FIX] calendar: Notification (style and new API)
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).
2015-07-23 10:51:12 +02:00
Christophe Matthieu 500c33b184 [IMP] web: split model.js into model.js and data_model.js. Web js modules must call web.DataModel. 2015-07-10 16:32:35 +02:00
qsm-odoo 3abe93715a [IMP] New many2manytags field
Many2manytag widget is specialized by calendar module so it had to be
common for community/enterprise
2015-06-19 09:46:38 +02:00
Simon Lejeune 74d1e43a40 [ADD] many addons: add new icons
This commits adds icons for most applications.  They are
necessary for the home menu in the enterprise edition.
2015-06-18 12:58:18 +02:00
Pankaj Joshi 98d0e3cc4b [IMP] updated icon classes which are renamed in font-awesome v4.2 and removed useless icon-* classes of old font-awesome 2015-06-08 12:52:29 +02:00
Christophe Simonis 5aba579e74 [MERGE] forward port of branch saas-6 up to 42db2db 2015-03-21 15:54:05 +01:00
Christophe Simonis 3baab9b22d [MERGE] forward port of branch 8.0 up to 7780004 2015-03-19 18:48:41 +01:00
Nicolas Martinelli 3da6c1a610 [FIX] web_calendar: reactivate the possibility to remove a calendar from side list
It is now possible again to remove a calendar from the side list
thanks to the 'X'

opw: 629511
2015-03-19 13:26:37 +01:00
Géry Debongnie 4fdf74fe21 [IMP] web+addons: improvement to module system
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.
2015-03-18 09:23:37 +01:00