Commit Graph
2661 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
mreficent 355a5dfc36 [IMP] *: fix typos in comments
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-07 10:28:33 +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
Sébastien Theys f0ffbea173 [IMP] *: remove unnecessary image sizes
The big images are probably never going to be used for the following models:

- pos category
- fleet brand
- livechat channel
- mail channel
- payment acquirer

And if big images are needed some day the model should use image.mixin instead.

PR: #34925
2019-08-02 16:47:58 +00:00
Sébastien Theys 58a2ffa26f [IMP] *: rename image fields
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small  => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925
2019-08-02 16:47:58 +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 e266c7c98a [MERGE] Forward port of 12.0 to saas-12.2 up to 5e4c1b3701 2019-07-23 13:41:00 +02:00
Martin Trigaux 5a6a414e2c [MERGE] Forward port of saas-12.4 to master up to aadc4a9f0b 2019-07-22 14:47:52 +02:00
David Beguin 3a804ecac8 [FIX] mail : fix post message callback error
When posting a message (here is the livechat use case),
the _postMessage function can call the callback function.
but this parameter is not mandatory.

If the caller of this function doesn't need a callback function
to be called after execution, the _postMessage function was crashing
as callback is not defined.

This commit fix this _postMessage function by checking that
callback is defined before calliing it.

Pre-required for Task ID: 2028059
Fix Task : 2037048
PR #34917

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-16 13:49:14 +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
Nicolas Seinlet 80fa405af5 [FIX] mail: message_unsubscribe takes 3 parameters
don't know why you try to use 4 parameters with a function that requires
3 of them:
https://github.com/odoo/odoo/blame/saas-12.3/addons/mail/models/mail_thread.py#L2283

closes odoo/odoo#34639

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-12 09:09:27 +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
Thanh Dodeur 01365a3f62 [FIX] mail: removes unsupported usage of formData.delete
This commit replaces the usage of `formData.delete()` as it is not supported
by Internet Explorer and Safari Mobile.

closes odoo/odoo#34787

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-07-11 09:39:54 +00:00
Nicolas Lempereur 545437b899 [FIX] mail: show old messages /leave w/o reload
Before this commit, if we had a livechat channel with a user and:

- in backend use command "/leave" to leave and unpin conversation
- [do not reload the page (or there is no issue)]
- then the user sends a new message

The chat window opens just with the new message. Fetched previous
messages are ignored due to being already in the mail manager, and
links between these messages and the threads were never updated.

With this commit, when fetching messages that are already in the mail
manager, these messages are linked again to threads.

This commit also fixes an issue in which messages moderated with
status "accepted" were not correctly removed from the moderation
mailbox. This problem occurred after the fix on re-linking messages
to threads.

opw-2031270
closes #34761

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-07-10 16:46:22 +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
Romeo Fragomeli 37edde1773 [FIX] mail: close thread window button isn't clickable easily
Before this commit, the close button on the thread window was
too small to click on it. The padding of the button wasn't over
the all available area.

After this commit, the padding of the close button is higher and
so the user can target it more easily on a small screen.
We had to reduce the padding of the parent.

Step to reproduce:
- Open the "Discuss" app
- Go to the "Channels" tab
- Open a channel
- Try to tap on the close button on the top left window

Task ID : 2033828

closes odoo/odoo#34977

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-07-18 13:00:28 +00:00
Alexandre Kühn a203e5318e [FIX] mail: re-render discuss on message_fetch with typing members
When (un)registering a typing members of a channel, the discuss
sidebar must be re-render. This is necessary in order to display
the typing indicator next to discuss items, i.e. '...'.

When receiving a message from a typing member, this person no
longer becomes a typing member.

Before this commit, for each new messages, the discuss sidebar
was re-rendered. This happens due to unregistering the author
from the typing members of the channel, even when the author
was not a typing member in the first place.

With this commit, when the list of typing members of a channel
does not change, the discuss sidebar won't re-render and slow
down the whole UI.

opw-2035443

closes odoo/odoo#33616

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-07-16 14:36:44 +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
Rémi Rahir e50800deaf [IMP] mail: Add simple partner notification 2019-07-18 11:51:57 +00:00
Adrien Dieudonne 9408cab4a6 [FIX] mail: tabs should appear on mobile
Since Chrome 74 or 75, tabs in Discuss suddenly disappeared.
Normally, these buttons are displayed at the bottom of the screen
when you open the Discuss app.

So we had to review this part and it seems more logical to override
the "height: 100%" property with "min-height: 0".
By doing this, the flex box element can grow from this size.

We also set flex-shrink to 1 to reduce the content with a scroll-bar
to let enough space to the other static elements (flex 0 0 auto).

Note that these rules are only applied on mobile.

opw-2030433

closes odoo/odoo#34947

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-07-17 13:21:51 +00:00
Christophe Simonis 34a8754d4f [MERGE] forward port branch saas-12.2 up to 498b4b4350 2019-06-14 15:20:01 +02:00
Christophe Simonis 5b2f64fd5d [MERGE] forward port branch 12.0 up to 4870251f0b 2019-06-14 10:15:49 +02:00
Christophe Simonis 25e3f27062 [MERGE] forward port branch saas-12.3 up to 48a9f5a633 2019-06-17 13:20:35 +02:00
Christophe Simonis a526ff3f70 [FIX] mail: use correct variable
Oversight of previous forward-port.
2019-06-13 18:20:47 +02:00
Christophe Simonis a0a11fd5e2 [MERGE] forward port branch saas-11.3 up to 8a19a6a2a3 2019-06-13 18:18:17 +02:00
Christophe Simonis 8a19a6a2a3 [MERGE] forward port branch 11.0 up to ec8c66991d 2019-06-13 16:52:40 +02:00
Christophe Simonis ec8c66991d [MERGE] forward port branch saas-15 up to 641ca4f7f4 2019-06-13 16:22:23 +02:00
Christophe Simonis 641ca4f7f4 [MERGE] forward port branch saas-14 up to 6a247212f8 2019-06-13 15:32:55 +02:00
Christophe Simonis 6a247212f8 [MERGE] forward port branch 10.0 up to 818d34630d 2019-06-13 15:25:43 +02: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
Julien Castiaux 306abd0131 [FIX] mail: send same attachment multiple times
In the Discuss app, using Chrome or IE11, try to send the same
attachment to different channels. The first attachment is correctly
detected but not the next ones.

The problem is due to a browser inconsistency, on firefox selecting the
same file in an `<input type=file>` triggers the `change` event. This is
not the case on Chrome/IE, selecting the same file doesn't triggers an
`onchange`.

opw-2006647

closes odoo/odoo#34076

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-06-12 14:36:03 +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
Mitali Patel 80c0bc00a7 [IMP] mail: removed messages from custom filter
Purpose of this commit is filter that allows to
filter by messages is not working properly so
removed messages filter from custom filter menu

task-1939953 closes-#34141

closes odoo/odoo#34141

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-20 10:48:23 +00:00