Commit Graph
162 Commits
Author SHA1 Message Date
Fabien Pinckaers 20dbf9190d [FIX] mail: wrong message on general channel 2016-07-11 09:57:30 +02:00
Mansi Gandhi 0abd35fbfb [IMP] mail: Notification email template header buttons order
On emails sent from tasks, the button "View Task" should be the main
Call to Action (primary), not New Task (that should be link like unfollow):
2016-06-16 14:09:46 +02:00
Goffin Simon ca8a38d201 [FIX] mail: forum reply shows as 'False'
When posting a comment after an answer in the forum, a mail
was sent to each subscriber with 'Re: False' as title.

In fact the title has to be 'Re:' + the name of the parent
record of this message.

When a mail is sent from the post, a link to access the subject
of the forum must be included in the mail.

opw:679073
2016-06-14 14:44:58 +02:00
Christophe Simonis ddb0fb2739 [MERGE] forward port of branch saas-9 up to 59d3f63 2016-03-24 16:53:45 +01:00
Denis Ledoux 6e09293b7d [MERGE] forward port of branch 9.0 up to 8e69043 2016-03-11 11:42:43 +01:00
Yannick Tivisse f6c0418a80 [IMP] mail: Send plaintext emails on discussion with external user/partner
When there are no available action buttons on the email (as Follow, View Task,
Convert to Opportunity), i.e. when the user/partner is not an employee, and
when the message subtype is 'Discussion', send a plaintext mail instead of
a formatted one.

Use case: Strange to receive a mail like this when you're on a lead and you
receive formatted mails.
2016-03-07 15:55:53 +01:00
Thibault Delavallée cb8c2d2b7e [IMP] tools: sanitizer: quote detection
Quote detection is now done in the sanitizer itself. It tags nodes that are
inside quotes (signature, text quotes, email quotes). The purpose is to remove
html_email_clean and have all the html cleaning / sanitizing inside a single
function. When a node is tagged, data-o-mail-quote is set on the node.
This attribute is added in the whitelist of valid attributes for the
sanitizer.

[REM] Support of shortening messages. The read more / read less will only
display or hide detected quotes and signatures. Shortening messages above
a given amount of characters is not supported anymore. Indeed it adds much
complexity to the sanitizer without adding much value to the result. The
primary purpose of the sanitizer is indeed to remove noise and unnecessary
content.

[TESTS] a lot of test are not necessary anymore, as read more / read less
display will be moved in the front-end and as the shortening has been
removed.Tests have therefore been cleaned and simplified.

[DEMO] mail: small demo update to include a bit quote detection
2016-03-03 15:44:56 +01:00
Christophe Matthieu 1320ad8cfe [FIX] mail: button_access is undefined in mail template preview
opw-668409
2016-03-03 15:41:02 +01:00
Denis Ledoux 85b39df834 [FIX] mail: odoo link in notification email
This is the forward port of the below revision:
135ad9e954

That should have been done in the below forward-port:
c298cf3250

opw-667335
2016-01-21 17:39:05 +01:00
Denis Ledoux 474baec1cf [MERGE] forward port of branch 9.0 up to ddd3e08 2016-01-15 16:46:32 +01:00
Aaron Bohy e5e31a0519 [FIX] mail: heart emoji not correctly replaced
Fixes #10445
2016-01-15 13:18:13 +01:00
Martin Trigaux c298cf3250 [MERGE] Forward port of 9.0 up to 7892d99f 2015-12-18 16:15:08 +01:00
Thibault Delavallée 135ad9e954 [FIX] mail: odoo link in notification email
Put the whole adresse, to avoid having it prefixed by a domain.
2015-12-11 10:29:40 +01:00
Denis Ledoux 4bebbfdcf5 [FIX] mail: jinja2 code compatible with wysiwyg for notifications
When editing an email template with the wysiwyg,
the `<` and `>` operators are automatically converted
to `&lt;` and `&gt;`, even for the Jinja2 conditions,
therefore breaking these conditions, and the render
of the email templates.

We avoid to use these operators in the email
template, so users can customize the notification
email template without having an advanced
knowledge on how to edit an email template containing
Jinja2 code.

Besides, the line return at the end of the email template,
just after the `% endif`,
is done on purpose as well: the wysiwyg adds automatically,
at the time of this revision,
`<p></p>` at the end of the email template source, but
this cannot be added on the same line than `% endif`,
otherwise this is considered as Jinja2 code, and it's not.

opw-659113
2015-12-10 16:58:15 +01:00
Christophe Simonis d490630745 [MERGE] forward port of branch 9.0 up to b293953 2015-11-25 16:18:10 +01:00
Christophe Simonis 1ea583b0ec [MERGE] forward port of branch 9.0 up to 14799a9 2015-11-09 10:40:45 +01:00
Géry Debongnie d17f656de4 [IMP] mail: various ui improvements
- less tweaks
- improve default channel name
- clean origin channel names in Inbox and Starred
- reduce fadeout duration in threads
2015-11-06 09:43:49 +01:00
Aaron Bohy c51af45384 [FIX] mail: various UI improvements
- vertically center date and messages separators in threads
- remove notifications in DM and livechat
- order mail demo data so that messages appear ordered (they are ordered by id)
- make sure that DM are pinned (they weren't on the receiver side)
- don't display DM until a message has been sent
- validate message body
- undo snackbar fine tuning
- fix Firefox scroll bug on sidebar rendering (the scroll position was often
  lost when the sidebar was re-rendered, seemingly because the width of the
  thread changed for a brief moment)
2015-11-17 10:06:18 +01:00
Christophe Simonis 0a07be8190 [MERGE] forward port of branch 9.0 up to 87a8896 2015-11-03 13:14:23 +01:00
Thibault Delavallée b52069754d [IMP] mail: notification template
The template used for notifications is updated. The general layout
is now

header: logo -- action buttons, contextual actions
separator
body
signature
Sent by company using Odoo
2015-11-02 11:50:14 +01:00
Thibault Delavallée 9e53e2173a [FIX] mail: small issues layout of notifications 2015-10-30 15:44:15 +01:00
Thibault Delavallée a36de1efad [FIX] mail: notification email cleaning
- remove / udpate some paddings. Indeed some part of the notification emails
  are badly aligned.
- postprocess the notification email to remove the content coming from odoo.
  This ensure that action buttons present in some emails are not forwarded to
  other people, notably customers. This is done by adding a div holding the
  whole notification emails, with a summary = o_mail_notification. A summary
  is used instead of a class or id because some html clients (like gmail)
  strip classes, ids, ... summary seems to be kept in several clients.
2015-10-26 10:28:46 +01:00
Géry Debongnie 2a80f0a850 [FIX] mail,crm: fix automatic notification emails
They need to have the message_type 'email' instead of 'notification', so
they can be starred in the interface.
2015-10-22 14:43:14 +02:00
Géry Debongnie 4d54a8c0ff [IMP] mail: various ui improvements
including:
- reset scroll position to bottom when leaving channel
- allow clicking on the avatar image
- hide stars when message is of type notification
- sort channel names
- add # before channel names
- rename Whole company channel in general
- replace \n and \r in messages by <br/>
- lighten the hover color of sidebar items in the client action
- Display @ before mentions
2015-10-22 14:43:13 +02:00
Raphael Collet f739c38d58 [IMP] mail: trigger garbage collection of attachments from model ir.autovacuum 2015-09-30 16:29:59 +02:00
Ray Carnes 6820dde909 [FIX] mail: channel description
"announces" is a present tense action verb, and is incorrect in this context
Closes #8282
2015-09-29 17:38:03 +02:00
Aaron Bohy a0cbf891af [REM] *: remove chat menu and timeline view 2015-09-01 20:57:13 +02:00
Jérome Maes 449f254638 [REF] mail : include real time, and replace Timeline features
This commit add instant messaging features in mail module to make it a real team collaboration tool. Lots of these new features will replace Timeleine view (which is not removed in this commit). Many files have been moved, split or created for a better structure.

- My Channels : A user can be member of channel (mail.channel). These are discussion group, but also an aggregate of notification. Setting a channel as document follower, it will receive all the message (of the chatter) in real time, as information stream.

- A new Inbox : this aims to replace the timeline view. The user will see its channels grouped by 'slot', and receive the message in real time. Jump to the form view, invite people, create private discussion group, talk directly to another employee, ... are the main features. Your message can still be starred. The 'Inbox' will only contain your needaction.

- Needaction concept : a needaction is a message calling you to do something. If you follow a document as a person, the posted message will be 'needaction' for you. It can also be a message where you are mention with a '@my_name' (this feature is not added in this commit).

- The chatter doesn't change so much. It still allow you to see the discussion about the document, to star some message, and treat your needaction.

- Chat : the only way to have a minified conversation is from the Inbox Client Action. It allow you to keep an eye on a channel when working on document.

- Compose Message : it is now common to the Inbox, and the chatter. It offers shortcode substitution, attachments management, and optional subtype.

- UI : the chat window has been clean, they have a new look now.

To do so,
- Chatter code have been completely rewrite, independently of timeline view
- Add 'bus' as mail dependency, to insure real time
- A mail.message is broadcasted on the bus channel (db, mail.channel, channel_id), and a channel header on (db, res.partner, partner_id)
- Extracting mail_thread mixin used for Chatter and ChatMailThread (Inbox client action). This uniformize the programming structure with the server side
- Clean CSS style and use LESS instead of CSS
- Define a new messafe format (message_format method in mail_message.py), compatible with fetching and broadcasting
- Apply guideline coding conventions

This commit also break the module im_livechat, since im_chat models don't exists anymore and will be fixed in the next commit.

Thanks to Thibault Delavallee (tde) for the long debates and precious advices, Richard Mathot (rim) for the support, Simon Lejeune (sle) for the client action layout, and the Usability Team (apr, lle, bst yti) for the long testing.

Conflicts:
	addons/mail/models/mail_thread.py
2015-09-01 20:16:09 +02:00
Jérome Maes 4af9631072 [MOV] mail, im_chat : move files and code from im_chat to mail and bus
- im_chat.session will be replaced by mail.channel
- im_chat.shortode is renamed into mail.shortcode
- im_chat.presence is moved to bus module
- js and controller code is moved from im_chat to mail module

This commit only move files, and modify manifests, bundles, ... The code will be adapt in the next commits.
2015-09-01 20:16:08 +02:00
Thibault Delavallée 01ab75f597 [IMP] mail: notification emails with button
Notification emails have been redesigned. They notably include buttons
allowing to perform some action directly from the email.

The notification creation and sending has been partially rewritten
and improved. The purpose is to lessen the number of rendering to perform
when sending emails to recipients. Recipients are first categorized into
groups. Basic groups are partners and users. The notification template
is then rendered twice, one for followers and one for not-followers. In most
cases there will be few rendering to perform. Through inheritance it
is possible to further categorize users. For example HR users / officers
that have approve / refuse buttons in their email.

A custom data structure is used to store data about buttons and actions.
URLs, follow / unfollow are added in the structure and used in the
template to render the email for a given group.

New routes are added in mail. Those allow to perform some action, like
going to a form in create mode, following / unfollowing, executing a method,
sending a signal for a workflow. Those routes are for users only and rely
on classic access rights.

A generic route for viewing records is added. It replaces the old redirect
action. According to some specific action given by the already-existing
get_access_action, the record will be visible for everybody (forum, blog)
or restricted (going on the Inbox / login / form view, according to access
rights).

The next commit will add the various inherits necessary to add the actions
in the main addons.
2015-08-28 17:30:42 +02:00
Yannick Tivisse c3a24af6a0 [REM] Remove res_partner_9, replace him by res_partner_12 2015-08-25 19:27:24 +02:00
Yannick Tivisse e35c166ea4 [REM] Remove res_partner_23, replace him by res_partner_12 2015-08-25 19:27:23 +02:00
Yannick Tivisse 0f3f8dec9b [REM] Remove res_partner_22, replace him by res_partner_1 2015-08-25 19:27:23 +02:00
Yannick Tivisse 1d75b68a2b [REM] Remove res_partner_21, replace him by res_partner_4 2015-08-25 19:27:23 +02:00
Yannick Tivisse dd12eb4fd8 [REM] Remove res_partner_20 2015-08-25 19:27:23 +02:00
Yannick Tivisse a0c82f9450 [REM] Remove res_partner_19, replace him by res_partner_2 2015-08-25 19:27:22 +02:00
Yannick Tivisse 706255eec1 [REM] Remove res_partner_17, replace him by res_partner_12 2015-08-25 19:27:22 +02:00
Yannick Tivisse bc80026f48 [REM] Remove res_partner_16, replace him by res_partner_1 2015-08-25 19:27:22 +02:00
Yannick Tivisse 2fa4e7c6a3 [REM] Remove res_partner_15, replace him by res_partner_3 2015-08-25 19:27:22 +02:00
Yannick Tivisse bdfc1a56b8 [REM] Remove res_partner_14, replace him by res_partner_4 2015-08-25 19:27:22 +02:00
Yannick Tivisse dfbc51135c [REM] Remove res_partner_13, replace him by res_partner_2 2015-08-25 19:27:21 +02:00
Yannick Tivisse f9dd6d70b9 [REM] Remove res_partner_11, replace him by res_partner_3 2015-08-25 19:27:21 +02:00
Yannick Tivisse 259f0c88bd [REM] Remove res_partner_8, replace him by res_partner_12 2015-08-25 19:27:21 +02:00
Yannick Tivisse 9c71ef9e90 [REM] Remove res_partner_7, replace him by res_partner_4 2015-08-25 19:27:21 +02:00
Yannick Tivisse 8b4a3e9ca4 [REM] Remove res_partner_6, replace him by res_partner_1 2015-08-25 19:27:21 +02:00
Yannick Tivisse ed97a70b10 [REM] Remove res_partner_5, replace him by res_partner_3 2015-08-25 19:27:21 +02:00
Thibault Delavallée 88b8cd0587 [REF] mail: model update for NewChatter
Main changes :
- mail.notification model is removed. People do not receive notifications
anymore. Instead two ways of following documents exist
  - using a channel; messages will be displayed on the channel itself
  in a near future commit
  - following with its partner; messages will all be considered as
  needaction, using a new m2m table. People should receive less
  needaction messages by following less records by themselves.
There is no more read / unread state anymore. Instead only needaction
messages are considered. Todo (Favorites) messages still exist, and are
stores on a new m2m table instead of using decorated notifciations.
- the main filter for documents is not message_unread anymore, but
message_needaction. A lot of views and filters have been updated
accordingly.
- the vote feature has been removed
2015-08-21 12:11:56 +02:00
Thibault Delavallée e6f038a821 [REF] mail: mail_thread: followers update
Followers can now be partners or channels. Partners following a document
will receive needaction, as previously. However people can follow documents
through channels. Members of a channel are able to listen to a stream
of messages using the channel. Those messages do not create needaction
messages. It is therefore possible to follow documents without receiving
too much notifications. For interesting documents subscribing with its
partner will create notification.

message_follower_ids fields is udpated. It is now a many2many to
mail.followers, not to res.partner anymore. A subscription can be either
a partner (partner_id) or a channel (channel_id).

Some access rules have been updated accordingly.
2015-08-21 12:11:56 +02:00
Thibault Delavallée 2470cde0e7 [CLEAN][DEMO] mail: cleaned mail.channel demo data. Less demo groups
and a bit more messages.
2015-07-09 11:13:02 +02:00
Thibault Delavallée d931aa3825 [RENAME] mail, portal: updated actions and views xml ids
for channel-related stuff. mail.channel views as well as timeline views
and actions have been renamed. Now the names follow the guidelines and
will be used in the upcoming refactoring of mail and chat.
2015-07-09 11:13:02 +02:00