Commit Graph
1455 Commits
Author SHA1 Message Date
Thibault Delavallée 486aab5098 [FIX][BACK FROM TRASH] mail: chatter: read more / read less
Read more / less feature is back (and probably ugly). It has probably been
removed when refactoring the old chatter.

[FIX] tools: html shortening: encoding issue
2015-09-24 16:20:53 +02:00
Jérome Maes 59f04dc364 [FIX] mail : '@' mention appears twice when selecting with clicking ENTER.
UP and DOWN (keydown event) move the cursor position at begining and end of the input text value. ENTER keypress event add 1 to the cursor position. So these events are now 'preventDefault'.
2015-09-23 14:35:43 +02:00
Thibault Delavallée a852218759 [FIX] mail: slack: log a note with internal subtype
The subtype id was not correctly computed, leading to all subtypes being notes. This
make the activites feature of CRM crash.
2015-09-22 10:28:01 +02:00
Jérome Maes ba0d2060f8 [FIX] mail : suggested partner check on chatter composer.
Embedded the template core in a 'root widget tag' to make the selector 'this.$('.o_mail_chatter_compose_message_suggested_partners input:checked')'  works.
2015-09-18 11:50:40 +02:00
Jérome Maes 762cc2dbfa [FIX] mail : make follower subtype edition works
On follower list of a document, the user can (if access rights granted) edit the subtype subscription of other follower. This open a modal with checkboxes. This is commit make this feature works and adapt it to channel follower.
2015-09-14 10:16:21 +02:00
Christophe Matthieu a4f041ed45 [FIX] mail: display attachment preview 2015-09-11 11:07:07 +02:00
Yannick Tivisse aedb75081b [IMP] mail: Set the compose message wrapper in odoo_blue color 2015-09-07 18:25:49 +02:00
Jérome Maes 4bdfa3b6ca [IMP] mail : invite follower wizard have 2 appearances
The wizard is the same object, but to add channel as follower, some fields was not required. Via the 'mail_invite_follower_channel_only' context key, the unrelevant fields are hidden.
2015-09-04 15:55:46 +02:00
Fabien Pinckaers 3658a894bc [IMP] modules description, no external link 2015-09-04 11:59:55 +02:00
Aaron Bohy 2f125cd936 [FIX] mail: followers: correctly redirect to partner form view 2015-09-03 16:31:20 +02:00
Aaron Bohy c2f2a51831 [IMP] mail: load more messages: scrolling
- In the chat, when loading more messages, automatically scroll to the previous
oldest message instead of staying at the top;
- In the chat, don't use the event 'scrollTop < 50' to load more messages as
it won't work on mobile (all the webclient is scrolling, so the client action's
scrollTop will always be 0);
- Generalize the way to load more messages between chat and chatter by moving
the logic to the MailThreadMixin and creating a common template;
- Improve the style of this 'load more messages' button
2015-09-01 21:04:34 +02:00
Aaron Bohy d3df3268a9 [FIX] mail: partner invite dialog
Correctly send a notification on people invite
Also remove useless less rule
2015-09-01 21:04:34 +02:00
Aaron Bohy d754c65c1d [FIX] mail: scroll to bottom on new message
only if the message arrived in the current channel
2015-09-01 21:04:33 +02:00
Aaron Bohy 9b14aa4648 [IMP] mail: mail_thread layout 2015-09-01 21:04:33 +02:00
Aaron Bohy ad39752093 [REF] mail: chatter: followers
Integration in the new design
DOM simplification
LESS refactoring
JS lint
Subtypes edition: fix edition in the modal and style it
2015-09-01 21:04:32 +02:00
Jérome Maes 223143bd97 [FIX] mail_channel, mail : various
mail_channel: call create with mail_create_nosubscribe=True to not subrscribe creator as follower,
since channel is not a mail thread (channel followers make no sense)

mail : adaptation with new chm controller for attachment, and remove author_ avatar from message format
2015-09-01 21:04:31 +02:00
Aaron Bohy 0d7083f766 [REF] mail: chatter
DOM and LESS simplification
New design integration
2015-09-01 21:04:29 +02:00
Aaron Bohy 238a17ada8 [FIX] mail: don't erase event handlers of the inherited widget 2015-09-01 20:58:13 +02:00
Aaron Bohy fead298d46 [FIX] mail: don't use deprecated controllers for attachments
deprecated since 6baf611df1

Also fix path do mimetypes, now located in web.
2015-09-01 20:58:13 +02:00
Jérome Maes fa2b555d74 [FIX] mail_thread js : starred/needaction message don't disapear when re-rendering 2015-09-01 20:58:12 +02:00
Aaron Bohy af3f652739 [REF] mail: mail thread
- DOM simplification
- LESS refactoring
- Unused code removal
- Integration in new design
- Fix a bug when trying to scroll the the last seen message in an empty channel
 (bug was due to the assumption that an empty jQuery element equals false,
 which is wrong)
2015-09-01 20:58:12 +02:00
Aaron Bohy ef9701ef68 [FIX] mail: searchview: disable groupby menu
The selector used to hide it was broken in the enterprise edition. This rev.
uses the new options of the searchview to prevent this part of the menu to
be rendered.
2015-09-01 20:58:11 +02:00
Aaron Bohy f0dfe87fa7 [IMP] mail: ControlPanel elements: buttons and sidebar
Put 'More' actions in the Sidebar
2015-09-01 20:58:11 +02:00
Aaron Bohy c694df2b6e [FIX] mail: correct use of breadcrumbs 2015-09-01 20:58:10 +02:00
Aaron Bohy 955b8728f0 [FIX] mail: fix call to $.Deferred() 2015-09-01 20:58:10 +02:00
Géry Debongnie 78276ebb9e [FIX] mail chatter: prevent crash when no message 2015-09-01 20:58:09 +02:00
Géry Debongnie 7ab686ffa4 [REF] mail: lint the js code
remove unused imports, add missing semicolons, ...
2015-09-01 20:58:09 +02:00
Géry Debongnie e700c802dd [ADD] mail: add mail_followers.less 2015-09-01 20:58:09 +02:00
Aaron Bohy 915c5d2053 [FIX] mail,mail_tip: trigger event when chatter is ready
The code in mail_tip included former implementation of the timeline view, which
is now replaced by slack.
2015-09-01 20:58:08 +02:00
Aaron Bohy 823ece2437 [FIX] mail,im_livechat: terminology: untoggle -> close 2015-09-01 20:58:08 +02:00
Aaron Bohy a0cbf891af [REM] *: remove chat menu and timeline view 2015-09-01 20:57:13 +02:00
Géry Debongnie 58a46c90cd [REF] mail: remove unused css, lessify some useful css
in particular, move the followers css from mail.css into mail_followers.less
2015-09-01 20:16:09 +02:00
Jérome Maes 95b97d1010 [REF] im_livechat : refactoring, make it compatbile with the nw mail module, change reporting sql view (split them in 2), adapt view, ... 2015-09-01 20:16:09 +02:00
Jérome Maes d3279983c8 [IMP] mail : add '@' mention feature
When composing a message (on client action, or chatter) if the user type '@', he will be able to tag partner, like facebook do. The mentionned partner are recipient of the message, even if there are not follower of the document. This message is a needaction for them.
2015-09-01 20:16:09 +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 82acdbaa49 [FIX] Several fixed due to some of the demo data removal
NB : Some tests have been modified.
One assert statement in orderpoint_calendar.yml has been modified,
but the change is legit has no python method has been modified at all
2015-08-25 19:27:24 +02:00
Christophe Matthieu d4bae06d08 [IMP] web: use css to display attachment mimetype
Widgets and website display images or display the type with icon like pdf, doc...
2015-08-21 22:06:52 +02:00
Christophe Matthieu 6baf611df1 [IMP] web: create generic controller '/web/content' and '/web/image'
Replace deprecate controllers like /web/binary/image, /web/binary/saveas...
Use ETag for all content with 'unique' option to cache the content if the content is never changed.
2015-08-21 22:06:52 +02:00
Thibault Delavallée 3a4848e3a9 [FIX] mail: followers widget
id of the partner / channel is now res_id. id is the id of the follower
entry itself.
2015-08-21 16:37:20 +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
qsm-odoo 5960d3cff8 [IMP] *: New icons 2015-08-11 14:31:10 +02:00
Valerie Pirenne 22a3c08af7 [IMP] web_tip: tip display using breathing point 2015-08-06 10:14:27 +02:00
Thibault Delavallée f6a246045f [FIX] mail: mail_followers:
- fix indentation
- fix a method not returning its deferred for the call
2015-08-06 10:06:18 +02:00
Thibault Delavallée 42c5eea677 [FIX] mail: chatter: do not crash when reading the chatter
of unactive records. The chatter now uses a correct read_ids (no need
to have a search set), with an active_test in the context allowing
to read on unactive records.
2015-07-30 10:19:14 +02:00
Aaron Bohy aa887ed02c [FIX] web,mail: widgets: replace $el.toggle() by do_toggle()
Since rev. 16eb36ff, do_show() and do_hide() on widgets toggle the classname
o_hidden on which the rule 'display: none' is defined, instead of calling
jQuery's show() and hide().

The method do_toggle(), sharing the same logic, has been introduced in rev.
74c5f772.

From now on, every widgets should call do_toggle() instead of $el.toggle() as
it will have undesiderable effects (they should call do_show() and do_hide()
instead of $el.show() and $el.hide() as well, this as been done in 16eb36ff).

This rev. replaces all calls to $el.toggle() by do_toggle(). It also adds
an optional argument to do_toggle() to force hidding or showing the widget.
2015-07-29 14:36:03 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +02:00
Christophe Matthieu 242e5231f0 [FIX] web, mail: move 'mail.compatibility' in mail
'mail.compatibility' javascript module require 'mail.mail'
2015-07-22 12:15:25 +02:00