Commit Graph
4734 Commits
Author SHA1 Message Date
Aaron Bohy 8397abd871 [IMP] mail: make chat windows somehow usable in mobile 2016-01-14 11:22:26 +01:00
Aaron Bohy 54396cfa41 [FIX] im_livechat,mail: don't automatically detach chat channels
This reverts commit a8239cd as the navbar dropdown recently introduced now
offers a quick access to channels without coming back in the Discuss App.

Moreover, this commit emphasizes the notifications navbar icon when there are
unread messages (or at least, it mutes it when there isn't).
2016-01-14 11:22:26 +01:00
Aaron Bohy 916d90af35 [IMP] mail: open dm shortcut from in navbar dropdown
Allows to directly open a dm channel from a chat window, without coming back
to Discuss.
2016-01-14 11:22:26 +01:00
Aaron Bohy b3868a613c [IMP] mail: needaction/unread messages counters
Some UI changes:
  - Unread messages in chat are now displayed as needactions in the Discuss's
sidebar (badge with counter of unread messages, instead of simply bolding the
channel name).
  - The counter displayed in the navbar is now the sum of needactions and total
of unread messages in chat.
  - The counter displayed next to Inbox is still the needaction counter.

For consistency between tabs/browsers/devices, the channel_seen info is now
broadcasted, meaning that every tab/browser/device will be noticed.

Also now correctly increment the unread counter of a channel if the received
message is a needaction.
2016-01-14 11:22:25 +01:00
Aaron Bohy d93231afe2 [IMP] mail: navbar: messaging menu
The navbar notification is now a dropdown containing a preview of all pinned
channels (except Inbox and Starred), channels with unread messages being on the
top.

It allows to quickly detach a channel without going back to Discuss.

The channels preview fetching is performed only once, and it is done in
background without blocking the whole UI (using shadow option or session.rpc()).

Also fixes a synchronization problem between server and client about the folded
state of channels (the info wasn't stored client side, so it produced weird
situations, e.g. unfolding a channel didn't actually unfold it).
2016-01-14 11:22:25 +01:00
Aaron Bohy 0301735354 [IMP] mail: move 'New message' button from navbar to Inbox 2016-01-14 11:22:25 +01:00
Aaron Bohy 18fccd9d6c [IMP] mail: put chat windows in a dropdown in case of overflow
Former algorithm to display chat windows was pretty basic: each window was
positionned 5 pixels to the left of the previous one, starting from the bottom
right corner of the screen. Thus, when there were too many chat windows to fit
in the screen, they overflowed to the left.

This rev. handles this case by hidding overflowing chat windows and making them
available in a dropdown positionned 5 pixels to the left of the last visible
chat window.
2016-01-14 11:22:25 +01:00
Aaron Bohy 37238d343a [FIX] mail: notifications: strip html tags
but keep jumps to line
2016-01-14 11:22:25 +01:00
Denis Ledoux 94920b43c9 [FIX] *: typo Important Messages -> Unread Messages
While this is important to read the replies
you get in the threads you follow, `Unread messages`
is more accurate to describe what these filters
displays.

opw-666739
2016-01-14 10:48:37 +01:00
Martin Trigaux ce2d94207b [FIX] mail,web: : untranslated term in view
_t(...) in xml qweb views do not work, not exported, not evaluted.
No reason to use t-att-*, just using simple attribute is enough.
2016-01-13 15:48:09 +01:00
Thibault Delavallée fd57dd5713 [IMP] mail: chatter: hide notification buttons
Using some templates it is possible to have odoo buttons directly in the
mail_message body. Hide them in the chatter as this is more noisy than
usefull.
2016-01-13 10:34:09 +01:00
Thibault Delavallée 2bfb880503 [FIX] mail: auto delete
Correctly set the auto delete property coming from the template in the composer.
Set the mail_auto_delete context key for message_post, and directly set the
auto_delete field value in mass mailing mode.
2016-01-13 10:34:09 +01:00
Martin Trigaux bc5e51d6b0 [FIX] mail: missing terms
Please people, stop changing the terms every week...
2016-01-13 10:05:06 +01:00
Christophe Simonis 33299fd689 [MERGE] forward port of branch saas-6 up to 5eee559 2016-01-12 18:46:23 +01:00
Christophe Simonis 5eee5591ab [MERGE] forward port of branch 8.0 up to 37ed5ce 2016-01-12 18:24:27 +01:00
Géry Debongnie 53f4649334 [FIX] mail: use our own autoresize for composer inputs
Instead of duplicating the autoresize logic, we might as well use it for
everything.
2016-01-11 14:32:51 +01:00
Thibault Delavallée 148c1ed51c [FIX] mail: html issue in invite email
Thanks Vitor Fernandes <vmlf01@gmail.com> for pointing it out.
2016-01-11 12:48:09 +01:00
Thibault Delavallée a35d2d5548 [FIX] mail: context propagation
Thanks michaelhwalther <michaelhwalther@gmail.com> for pointing it out.
2016-01-11 12:48:09 +01:00
Géry Debongnie cf294f723f [FIX] mail: prevent double scrollbar with notification bar
when the bar asking for notification permission appears, it can cause
two scrollbars to appear in the client action.  This commit moves the
notification bar inside the chat content, which solves the issue.
2016-01-11 11:00:18 +01:00
Odoo Translation Bot 1c33197828 [I18N] Update translation terms from Transifex 2016-01-10 03:04:15 +01:00
Odoo Translation Bot 9c911d0364 [I18N] Update translation terms from Transifex 2016-01-10 01:28:32 +01:00
Christophe Simonis 499c2b8da5 [MERGE] forward port of branch saas-6 up to 580389a 2016-01-08 18:26:59 +01:00
Christophe Simonis 580389add8 [MERGE] forward port of branch 8.0 up to 7041b25 2016-01-08 17:05:38 +01:00
Thibault Delavallée a69c2bab0a [FIX] mail, mail_channel: recipients of channels
Mailing lists (mail.channel) should not send specific notification emails.
Indeed there can be a lot of recipients and customizing each email can
take time to compute. This leads to posting a message on a mail.channel
being very slow.

It is now possible for a model to customize the notification email
recipients computation. The first use is to ensure that mail.channel
encodes recipients using email_to instead of recipients_ids. This way
less processing is performed on notification emails.

This is a manual cherry-pick of commit d4a1eb4435
that was not forard ported. Mail has indeed evolved since 8.0 and its
forward port was not an easy task.

This commit also includes the fix of mail.channel recipients. All are now
considered as equal and receive a simple notification email. No distinction
is done between partners and users. The notification emails for channels
should be as simple as possible.
2016-01-08 16:40:40 +01:00
Géry Debongnie 739301be09 [FIX] mail: add link to urls clientside, not serverside
the server should avoid as much as possible modifying emails.  Adding
links is a presentation concern, so this commit moves this logic client
side.
2016-01-08 15:02:22 +01:00
Aaron Bohy dfdd38e3b2 [FIX] mail: Discuss: don't suggest to join private channels
Problem was that administrators have access to every channels, even private
channels they are not registered to, because when trying to join an existing
channel, the autocomplete proposed every channels accessible for the user, but
didn't filter private ones.

This rev. makes sure to only suggest non-private channels.

Also prevent '|' domain injection to disable filters (odoo/odoo@44e65e72d3)
by using expression.py to build domain.
2016-01-08 14:32:51 +01:00
Aaron Bohy 0fbc128033 [FIX] mail: followers: subtypes: correctly notify channels
Except for messages, activities on a document like internal notes posted
trigger notifications to partners and channels following the corresponding
activity's subtype.

Rev. 69ed801 rightly re-introduces a filter on followers to prevent notifying
more partners than necessary. Unfortunately, this filter doesn't take into
account channels, which are thus automatically removed from followers to
notify, whatever the subtypes they follow, e.g. internal notes on a document
don't appear in channels following the 'Note' subtype of this document.

This commit makes sure that channels always pass through that filter, but warns
users that public channels should probably not following internal subtypes.

Also makes the edit subtypes dialog html valid (li's must be inside, e.g., ul).
2016-01-08 14:32:51 +01:00
Christophe Simonis 329c6e7763 [FIX] mail: check if browser support Notification API before verifying permission 2016-01-08 11:48:34 +01:00
Martin Trigaux 44e65e72d3 [FIX] mail: ignore abritrary argument domain for searching channel
We should not trust arbitrary arguments from public method to compose a domain
as it is possible to inject '|' to disable filters and be able to search any
channel (mitigated by access rules).
Create a private method and use a wrapper that ignores the domain.
2016-01-08 10:07:38 +01:00
Goffin Simon 61cf01b7a8 [FIX] mail: mailing domain not set properly
When selecting contacts from Contacts list views and clicking on
action window "Partner Mass Mailing", the 'active_domain' must be
filled in the wizard with the selecting contacts. In this way,
the right mailing_domain will be set when creating the related
mail.mass_mailing record (in addons/mass_mailing/wizard/mail_compose_message.py
in function get_mail_values).

opw:659383
2016-01-07 16:58:52 +01:00
Martin Trigaux 5ca043b86c [FIX] mail, purchase: forwardport
Missing parts, I only blame rerere
2016-01-06 08:11:45 +01:00
Martin Trigaux 8b4f052a38 [MERGE] Forwardport of branch saas-6 up to c649bb0df 2016-01-05 18:28:06 +01:00
Denis Ledoux 0f085db19e [MERGE] forward port of branch 8.0 up to a4e48d4 2016-01-04 12:36:14 +01:00
Odoo Translation Bot 8000181772 [I18N] Update translation terms from Transifex 2016-01-03 02:54:27 +01:00
Odoo Translation Bot 4dac9f2b73 [I18N] Update translation terms from Transifex 2016-01-03 01:24:45 +01:00
Martin Trigaux 955ed51687 [MERGE] Forwardport of branch 8.0 up to 6efc3712 2015-12-30 11:48:14 +01:00
Martin Trigaux ddeb90d46e [I18N] Update translation terms from Transifex 2015-12-29 17:40:57 +01:00
Aaron Bohy c4240b547f [FIX] mail: chatter composer: full composer button
The chatter composer extends the basic composer to, among other things, add
a button to open the full composer next to the button to add an attachment.

In a recent commit, the basic composer template has been slightly changed and
the buttons have been extracted in a sub-template, which seems to break the
template inheritance (the xpath refers to one of those buttons).

This solution simply removes the sub-template and duplicates the code.
2015-12-29 15:59:54 +01:00
Aaron Bohy 3f370651c7 [FIX] im_livechat,mail: don't translate html data-type argument
as it is only there for a technical purpose (used in JS to bind event handlers)
2015-12-29 15:59:54 +01:00
Géry Debongnie cc8c355ecb [IMP] mail, bus: display native notifications if user away
This commit introduces native notifications (if available) to the
discuss application.

Those notifications will only appear if the user grants the permission
for that.  A notification bar will appear in the discuss application if
necessary to prompt the user.

Also, it always is the master bus that will be the one sending the
notification.

For this change, it was necessary to be able to detect if the user has
the focus on some other odoo tabs.  For this reason, the bus was
extended.
2015-12-29 14:47:40 +01:00
Aaron Bohy 30003dbce3 [FIX] im_livechat,mail: various ui fixes/improvements
im_livechat:
  - feedback message wording
  - livechat_channel form view typo

mail:
  - channel form view: email_send field label wording and layout
  - notifications preview extended
  - client action mass mailing composer fine tuning
  - client action mass mailing channels tooltip
  - client action idle bullet color
2015-12-28 10:19:22 +01:00
Odoo Translation Bot 8fe876cae7 [I18N] Update translation terms from Transifex 2015-12-27 02:54:48 +01:00
Odoo Translation Bot e6a92e523f [I18N] Update translation terms from Transifex 2015-12-27 01:25:25 +01:00
Martin Trigaux ef762f4335 [FIX] wrongly translated planners
breaking the rendering
2015-12-24 16:09:06 +01:00
Denis Ledoux cccec4ac62 [FIX] mail: To: me, To-do display messages to_read
These menus are supposed to display the message
to: me / to do that matches the `To Read` filter.

The filter was correctly displayed in the search
view, but the records displayed were not the
result of the search, because the call to
`message_read`, in `message_fetch` was done
too early, with the wrong domain.

This is because `searchview.has_defaults`
& `searchview.ready` have disapeared in saas-6,
with the refactoring of the search view.

opw-659137
2015-12-24 14:13:17 +01:00
Aaron Bohy f6c20fa4b3 [FIX] bus,mail: user presence
Commit 5d1b323. re-enabled the user presence updates and notifications.
Unfortunately, it showed poor performance due to the high frequency of bus
notifications triggered on our instance (~600k users).

In this rev., we don't trigger notifications on presence changes anymore, but
we rather send the presence of users we have a DM open with, at the end of each
poll period. For performance reasons, we ensure not to do that more than once
every 30 seconds.

We also refined the detection of the 'away' status client side. 'Last presence'
timestamps are stored in the local storage, and the current inactivity period
is sent at each poll. Those presence timestamps now rely on browser activity
detection (click, keypress... events) rather than on the focus on Odoo tabs.

Finally, we removed the no more necessary cron introduced in 5d1b323.
2015-12-24 12:59:46 +01:00
Martin Trigaux 4be1a8cc7d [I18N] Update French translation terms from Transifex
Some planners were incorrectly translated, breaking at rendering
Fixes #10190
2015-12-24 10:42:03 +01:00
Aaron Bohy 26b00a844a [FIX] mail: client action: traceback on composer focus
wrong copy-paste introduced in c4fb2b50e0.
2015-12-24 09:05:28 +01:00
Denis Ledoux 5e51dc9924 [FIX] mail: unfollow buttons for portal users
The route `/mail/unfollow` is used by the button
`Unfollow` in the mail notification template so a user
can remove himself from the followers of a thread.

To be able to remove yourself from the followers,
you need to have the write access on the thread
(see `message_unsubscribe` in `mail/mail_tread.py`)
which you perhaps do not have, for instance if you
are a portal user.

The unsubscribe of this follower from the thread
should therefore be done as sudo.

opw-659295
2015-12-23 17:59:36 +01:00
Géry Debongnie c4fb2b50e0 [IMP] mail: extended composer for mailing channels
In Discuss, when the user opens a channel, the composer was the same,
regardless of the channel type.  This is fine for chat channels, because
we expect mostly small one liners to be written.  But for mailing
channels, it is a problem:  it is too easy to send a mail to everyone
just by typing ENTER, when the user wanted to go to the next line.

This commit introduces a new widget, the extended composer, to be used
for those channels.  It allows the edition of the subject line, and
don't sent messages when the enter key was pressed.
2015-12-23 14:37:41 +01:00