Commit Graph
294 Commits
Author SHA1 Message Date
Mitali Patel a54457e04d [IMP] mail: better exception activity handling in kanban and tree
The purpose of this task is to add a visual indicator on kanban and list
views when there is an exception activity on a record. To do so, two
fields have been added on the activity mixin that determine if the record
has an exception activity and its corresponding icon.

When there's an exception activity, the next activity icon is different
in the kanban and in the list view, the icon is displayed at the end of
the column with no label.

Prefetching all activity_type_ids in compute will allow to lessen
queries (3 query for this compute) and cache may benefit to other
mail.activity.mixin computed field, like activity_state in kanban view

Task 1889379
2019-08-07 15:41:05 +00:00
Dharmang Soni 840442a24f [IMP] *: hide all activity related filters
All activity filters are now invisible in the corresponding search views.

These filters were only used by activity redirection (when clicking on
the activity item in the systray) so we hide them to reduce the noise
for the user.

"My Activity" filter has also been removed, its corresponding domain is
now directly set in the action where it was used.

Task 2036392
2019-08-07 07:31:32 +00:00
Alexandre Kühn 3c134293b6 [FIX] mail:tests: restore unintentionally remove test
Revision on https://github.com/odoo/odoo/commit/ff7ea6b654175e3138f5f36d2e5b4214cebef499

Due to some git conflicts, it duplicated history tests and removed
the previous test 'input not cleared on unresolved message_post rpc'.

closes odoo/odoo#35502

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-08-06 14:52:28 +00:00
Nikunj Ladava 0c37b9fb39 [IMP] mail, test_mail: new 'History' mailbox in Discuss
This commit adds a new mailbox in the Discuss app called 'History'.
Messages that have been marked as read are moved to 'History'.

Notifications are required to link history messages to users. So
notifications are now deleted after they are more tha 6 months old.
This means History mailbox keeps less than 6 months old messages.

Note that this feature only works when user notifications are handled
in Odoo. This can be set in the user preferences, under the
"Notification Management" section.

Task-ID 402597
2019-08-05 11:50:19 +00:00
Christophe Simonis d5e1fd16b4 [MERGE] forward port branch saas-12.4 up to cda4f3c308 2019-07-29 14:10:30 +02:00
Christophe Simonis bfd34e14b1 [MERGE] forward port branch saas-12.3 up to 40e8b67179 2019-07-26 15:12:29 +02:00
Christophe Simonis 40e8b67179 [FIX] mail: add missing requirement in test
Oversight of previous forward-port.
2019-07-26 14:34:48 +02:00
Christophe Simonis e0f9c092cc [MERGE] forward port branch saas-12.2 up to 1d6d790513 2019-07-26 11:32:43 +02:00
Christophe Simonis 1d6d790513 [FIX] mail: adapt test to new version
Oversight of previous forward-port.
2019-07-26 10:36:18 +02:00
Christophe Simonis a4b1b532ea [MERGE] forward port branch 12.0 up to b82df99d7a 2019-07-25 20:01:05 +02:00
Martin Trigaux a98427834e [MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c2
closes odoo/odoo#35119

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 10:32:23 +00:00
Julien Castiaux ceeb5b51d5 [FIX] mail: form activity widget: do not close activity popover on click
Create an activity in a chatter, mark it as done, click inside the
textarea, the popover is automatically closed.

The `click` trigger both opens and closes the popover on click.

opw-2028399

closes odoo/odoo#34982

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-07-22 15:08:15 +00:00
Martin Trigaux 1f5a4649a6 [MERGE] Forward port of saas-12.3 to saas-12.4 up to 87fc1554d6
closes odoo/odoo#34820

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 13:59:35 +00:00
Martin Trigaux c962b2cd11 [MERGE] Forwardport of saas-12.2 to saas-12.3 up to 01365a3f62
closes odoo/odoo#34747

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 07:22:41 +00:00
Alexandre Kühn f9ead39f5f [FIX] mail: rename direct message chat
Before this commit, when a direct message chat was renamed, it
crashed with the following error:

`TypeError: Cannot read property 'toLowerCase' of undefined`

This occurs because the name of the dm chat changed from the RPC
response. However, no new name was provided, thus it sets its
name to `undefined`.

Test has been adapted in order to reflect that the server does not
response with new name after RPC `channel_set_custom_name`.

closes odoo/odoo#34641

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-07-09 12:37:07 +00:00
Alexandre Kühn bdf45dca50 [FIX] mail: auto-update out-of-office info on im_status change
Before this commit, chat window's out-of-office info did not change
when direct partner's `im_status` is/was on 'leave'.

Users had to reload page to see updated out-of-office info.

Task-ID 2007663
2019-07-16 14:36:44 +00:00
Alexandre Kühn 4bde721f92 [FIX] mail: notify other tabs on document thread message post
Before this commit, most new messages added to the mail manager were
handled as if recently posted from a document thread. As a result, it
was frequently setting a new item in the local storage to notify
other tabs from these new messages.

The intent of this behaviour is to notify other tabs of newly posted
messages in a document thread, without using a longpolling
notification. That means this logic should only apply on messages
that have been recently posted on a document thread.

Sometimes, this issue was breaking the local storage on Firefox.
It showed the error message "Quota Exceeded Error" whenever `setItem`
was used, even when items were removed beforehand. The capacity of
the storage was only a few Kbs on this domain, far from reaching the
maximum capacity. We think that this error comes from the concurrent
`setItem` on multiple tabs, but this is very hard to reproduce.

This commit fixes the issue by limiting the `setItem` to the tab
that really posted the message. Tests have been adapted in order to
pass only with this fix.
2019-07-16 13:13:22 +00:00
Christophe Simonis 5e81b18e24 [MERGE] forward port branch saas-12.3 up to 0247d2f35f 2019-06-27 20:45:52 +02:00
Christophe Simonis 6c5783bd5a [MERGE] forward port branch saas-12.2 up to 465909f0fd 2019-06-27 19:10:09 +02:00
Christophe Simonis 465909f0fd [MERGE] forward port branch 12.0 up to cd21c016b0 2019-06-27 18:01:07 +02:00
Christophe Simonis cf51b5f25d [MERGE] forward port branch saas-12.3 up to 793933a128 2019-06-25 14:23:48 +02:00
Christophe Simonis 78b2063b29 [MERGE] forward port branch saas-12.2 up to 8747d72f1e 2019-06-21 15:16:54 +02:00
Christophe Simonis be780012bf [MERGE] forward port branch 12.0 up to 0e72b983c3 2019-06-21 11:06:04 +02:00
Alexandre Kühn ea1960d10a [FIX] mail: keep chat window hidden on receiving new message
Before this commit, when receiving a new message from a hidden chat
window, it was making it visible. Because of this, if we had focus
on any other window, the focus was lost. Even more annoying, if we
had focus on the left-most visible chat window, it moved to hidden
menu, so that new chat window takes its place.

This commit fixes the issue by keeping new chat windows hidden
on receiving new messages, in case there is not enough available
space.

Task-ID 2026101

closes odoo/odoo#34291

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-24 16:04:27 +00:00
Parth Choksi 2f8f832cee [FIX] mail: traceback on opening chat full composer
When full composer is opened it checks for partner information by calling
get_partner_info controller, if information are missing then it opens missing
partner information popup to fill missing partner information,
currently if partner information is missing and if try to open full composer it
throws traceback, this is due to commit:
https://github.com/odoo/odoo/commit/957c99abd53b42fa82903ad7ad03300797a706cf
here this._rpc is used in inner function which is wrong, it should be self._rpc

Scenario: we go to an opportunity and set the email but
we do not set a customer, and then when we open the chat composer
by sending a message, we're getting the traceback.

It will be fixed in this commit.

task-2005890

closes odoo/odoo#34084

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-13 05:07:43 +00:00
Priyanka Kakadiya f4157f68ce [IMP] mail: Do not show the confirmation popup while clicking on "Following"
Purpose of the commit is to improve the user experience of the chat by
deleting some extra step that might be unnecessary

So when a user tries to remove him/her self from the follower, it will not ask
for confirmation and removes the user from particular document straight away
without any confirmation.
If user remove the another partner from follower then it will raise the prompt
dialog for confirmation

task-1998188
Closes: #34050

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-07-19 07:09:32 +00:00
Martin Trigaux fd15ca1918 [MERGE] Forward port of saas-12.4 to master up to 1f5a4649a6
closes odoo/odoo#34850

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:12:26 +00:00
RomainLibert 7594cb6279 [IMP] mail: Remove the 'Bell' icon to edit subtypes
There are 2 different manners to edit the subtypes:
- The bell above the chatter
- The pencil next to your avatar on the followers dropdown.

It's better to have only one way to edit these subtypes.

As this is an advanced configuration that is not part of the
onboarding process, remove the most obvious way to edit it.
2019-07-05 13:04:19 +02:00
Romain Derie aebbd0317f [FIX] mail, web: directly load async debug.xml during QUnit tests
Before this commit, the test `list: edit view menu item` would sometimes crash
as now the debug manager loads its templates with an `xmlDependencies` where it
was not the case before (included in base.xml), see 73327db065.
2019-06-06 15:08:04 +02:00
Christophe Simonis 71a50a2214 [MERGE] forward port branch saas-12.3 up to 409679866b 2019-06-06 11:54:35 +02:00
Lucas Perais (lpe) 6a29dec93f [FIX] mail: message_attachment_count can be explicit in form view
Before this commit, it was not possible to have the field message_attachment_count
explicitly defined in the form view. It crashed inelegantly if it were the case

After this commit, it is possible to have that field in the form view

OPW 1998503

closes odoo/odoo#34143

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-14 13:38:09 +00:00
Christophe Simonis ce4165780a [FIX] mail: avoid race condition in test 2019-06-05 09:08:31 +00:00
Christophe Simonis c8d7ad9a6b [MERGE] forward port branch saas-12.2 up to 995aa1685e 2019-06-03 15:49:31 +02:00
Thanh Dodeur c212cfe899 [REF] *: removes datas_fname from ir.attachment
This commit removes the field `datas_fname` from `ir.attachment` as
it was unnecessary and most of the time the duplicate of `name` or
`url`.

Task #1909865

closes odoo/odoo#32976

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-05 09:12:13 +00:00
Pierre Paridans ece2fed154 [REF] mail: chatter topbar styles
The Chatter's topbar (containing the buttons like 'Send Message', 'Log
Note') was difficult to deal with: specially the positioning of its
content (a float into another float...).

So, this commit refactors the topbar's layout using Flexbox. It allows
to simplify and reduce the amount of (S)CSS needed to achieve the same
visual result.

In the process, the Followers (dropdown) buttons now use correctly
nested .btn-group components (as described by the Bootstrap 4
documentation) and SubTypes dropdown items use semantic html element
(<button>) instead of attaching behavior on icon element(<i>).

Finally a few Chatter's tests requested a slight adaptation (cf.
trimming element's textual content).

Task ID: 1928573

closes odoo/odoo#33823

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-06-04 13:47:33 +00:00
Christophe Simonis 5548029fb7 [MERGE] forward port branch saas-12.4 up to 5e81b18e24 2019-06-27 20:51:59 +02:00
Christophe Simonis 9035fb8a2a [MERGE] forward port branch saas-12.4 up to 618ea1ab67 2019-06-18 10:24:25 +02:00
Hiral Bhavsar 3cd7ed07a2 [IMP] *: remove 'view_type' on window actions.
The old tree views don't really exist anymore, this odd pseudo-flag to
dispatch between "list" and "tree" tree views has no reason to remain.

Task 1937686

closes odoo/odoo#31243

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-17 11:34:17 +00:00
Alexandre Kühn faf020361e [FIX] bus, mail: fetch im_status with '/longpolling/im_status'
Before this commit, mail status manager was regularly fetching
`im_status` of partners with `this._rpc()`. This used the main
thread worker, so it may be overloaded because of that.

To mitigate this issue, mail status manager now uses a new route
`/longpolling/im_status` to fetch `im_status` of partners using
the longpolling thread worker.

closes odoo/odoo#33238

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-05-20 07:39:53 +00:00
Thibault Delavallée 70d44ed787 [REF] mail, various : make message_get_suggested_recipients from mail.thread private
Purpose: make some methods from mail.thread mixin private and update their
naming if necessary. Some methods prepare data for business flows and deal
with internal information. Public methods should either use of give some
access to those methods. Computation itself should be keps internal.

In this commit we put message_get_suggested_recipients as private. As it is
used in discuss JS we define a controller that controls access to this method.
It explicitly checks for related document access rule and rights before
calling the private method.

Some addons are updated accordingly to the method change.

Related to task ID 1911679
Linked to PR #29483
2019-05-13 15:18:40 +00:00
Christophe Simonis 3f95b074e9 [MERGE] forward port branch saas-12.2 up to f2be461f09 2019-04-05 18:46:10 +02:00
Christophe Simonis f2be461f09 [MERGE] forward port branch saas-12.1 up to f2d0995362 2019-04-05 10:50:56 +02:00
Thanh Dodeur f2d0995362 [FIX] mail: fixes document viewer's url preview
This commit fixes the document viewer: the document viewer
was altering the `type` key of attachment objects, this issue was causing
matching errors in some cases.

With this commit, the document viewer widget uses its own key `attachment.fileType`
to store the information that used to override `attachment.type`

closes odoo/odoo#32414

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-04-04 10:35:54 +00:00
Hiral Bhavsar 983d098794 [IMP] mail: adapt activity qunit test suite
The activity view has been refactored and improved so the qunit test
suite needed to be adapted.

More tests have also been added to test new features (progressbar,
schedule an activity, etc.) and the method 'get_activity' has been
correctly mocked (the result was previously hardcoded).

Task 1894990
2019-05-03 10:19:40 +00:00
Christophe Simonis 71faa19af0 [MERGE] forward port branch saas-12.1 up to 2b3296bbf8 2019-03-11 14:42:34 +01:00
Christophe Simonis 2c5c9b8342 [MERGE] forward port branch 12.0 up to c023d0784f 2019-03-08 17:56:14 +01:00
Christophe Simonis 0e7675847f [MERGE] forward port branch saas-12.1 up to 0f4abc5c22 2019-02-22 16:25:02 +01:00
Alexandre Kühn 0fb43cf133 [FIX] mail: no traceback on receiving seen notification
Before this commit, when we post a message and someone
has received it, there could be a traceback.

Steps to reproduce:
1. Two users are logged in.
2. On one user:
   - open any app except Discuss
   - From systray messaging menu, click on "New messages"
   - Open Discuss
   - Post a message in a direct chat with other User.
> traceback `Cannot read property 'getID' of null`

closes odoo/odoo#31228
2019-02-19 09:39:57 +00:00
Julien Giannone 230177ffa9 [IMP] mail: add a different layout for inactive followers
When displaying the followers of a document, followers who are set as inactive will be displayed in a different layout than the active ones. The purpose is to mark a clear difference between active and inactive followers.

Task #1957849

closes odoo/odoo#32084

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-03-27 15:54:46 +00:00
Christophe Simonis 44515bc7be [MERGE] forward port branch saas-12.2 up to c9f832d9f0
closes odoo/odoo#31790

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-13 14:24:51 +00:00