From 7137891a8a5d024a7f36a5af1d3a3c2686a9a96a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Thu, 26 Nov 2015 10:48:29 +0100 Subject: [FIX] mail, im_livechat: correctly displayed message date Messages are required to be displayed in a smarter way: relative to the current date, if it's a recent message, or absolute if not. This commits rework most of the date processing code to comply with these requirements. Messages were preprocessed each time a thread is rendered, which is stupid. It should be preprocessed only when the message is created. This was a small problem because livechat does not use the chat manager, so a simplified version of the preprocessing had to be done. --- addons/mail/static/src/xml/thread.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'addons/mail/static/src/xml') diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml index 394627940cb..70996dd7d47 100644 --- a/addons/mail/static/src/xml/thread.xml +++ b/addons/mail/static/src/xml/thread.xml @@ -30,11 +30,11 @@ -
+
- + - +
@@ -56,8 +56,8 @@ t-att-src="message.avatar_src" class="o_thread_message_avatar"/> - - + + - - - + + - on -- cgit v1.2.3 From db8203c27a21acdbcad2cf1c394b6fea3cf13688 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 24 Nov 2015 15:30:25 +0100 Subject: [FIX] base,hr,mail: prefetch mention suggestions The purpose of this commit is to improve the overall performance of the mention mechanism of the client action and chatter composer, by pre-fetching some data. First, the employees are fetched at chat initialization (basically, at web client initialization), if hr is installed. Second, when focusing on the composer of a channel, the members of this channel are fetched. In the case of a chatter, the members are already known as they are the followers of the document. When the user types a mention, we first display suggestions from the pre-fetched partners, and we only perform an RPC when there are no more result matching the search string. This RPC searches among user, and then partners if there aren't enough matches. A few side changes occurred: - auto_join set to True on user_ids field of res.partner to boost the query that searches partners that are users - the '/mail/read_followers' route now returns follower's email as well, as we need it for the mention; - a partner can now be mentionned several times in the same message; - mentionned partner previsualization has been removed, mainly because of the previous point, but also because it simplifies the code; --- addons/mail/static/src/xml/chatter.xml | 2 +- addons/mail/static/src/xml/composer.xml | 33 +++++---------------------------- 2 files changed, 6 insertions(+), 29 deletions(-) (limited to 'addons/mail/static/src/xml') diff --git a/addons/mail/static/src/xml/chatter.xml b/addons/mail/static/src/xml/chatter.xml index 6cc8b86b19e..f8ce3057e14 100644 --- a/addons/mail/static/src/xml/chatter.xml +++ b/addons/mail/static/src/xml/chatter.xml @@ -6,7 +6,7 @@ --> - + diff --git a/addons/mail/static/src/xml/composer.xml b/addons/mail/static/src/xml/composer.xml index e47363c07bf..9a1e679c4ba 100644 --- a/addons/mail/static/src/xml/composer.xml +++ b/addons/mail/static/src/xml/composer.xml @@ -2,7 +2,6 @@
-