Commit Graph
3105 Commits
Author SHA1 Message Date
Alexandre Kühn 62a2ca4c14 [FIX] mail: make messaging menu header visible in Safari
Task-2389455

closes odoo/odoo#62885

X-original-commit: 759ddc180a7fa186d9ad36583ebd1f4857f584e7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-04 12:48:54 +00:00
Xavier Dubuc cf31cd7946 [FIX] mail: split attachments list to improve style
There is now two lists of attachments : first one with images and second
one with non-images. Attachment viewer allows to navigate through
previews of all viewable attachments in the order they're shown.

task-2272587
task-2401325

closes odoo/odoo#62719

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-04 09:16:32 +00:00
Xavier Dubuc 1797835051 [IMP] mail: replace selectedMessageLocalId prop by value from store
task-2282218

closes odoo/odoo#61768

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-02 10:26:46 +00:00
Xavier Dubuc bdff0f6d28 [FIX] mail: fix partner seen infos wrongly set as readonly
task-2391981

closes odoo/odoo#62239

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-12-04 09:06:49 +00:00
Didier (did) 3f100568b5 [FIX] mail: increase chatter max-height.
We go back to the fake textarea to avoid a flickering created by the
`this._textareaRef.el.style.height = "0px";`.
This height reset create an unwanted scrollbar jump that could hide the content
of the textarea (not aside mode).

task-2390354

closes odoo/odoo#62828

X-original-commit: 52f3db8ef61d4284d8ea624022bc1355f7f8cf00
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-03 13:51:29 +00:00
Sébastien Theys 0cf14852a3 [FIX] mail: remove html from new message notification
task-2388659

closes odoo/odoo#62756

X-original-commit: 8af59b95b477b2eeddec118663e21b00a4e48801
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-12-02 15:51:27 +00:00
Didier (did) a57d4377fb [FIX] mail: set href on notification link.
This allow the user to open link in new tabs with middle click

task-2387837

closes odoo/odoo#62738

X-original-commit: 7a57cf0b68b3a1dce4276c6456a94b05eec20f28
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-02 12:35:42 +00:00
Nicolas Galler 25728bea74 [FIX] mail: when adding an attachment, do not discard edits
Behavior prior to this commit:

- edit an existing invoice
- add a line, but do not save
- add an attachment - the attachment uploads and the new line stays visible
- save the record: the line now disappears

Behavior after this commit:

- changes are not discarded when uploading an attachment

opw-2369162

closes odoo/odoo#62727

X-original-commit: abf1982d4ec09b5e87c1d7573158257f91961214
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2020-12-02 11:03:14 +00:00
Xavier Dubuc de638c3f18 [FIX] hr_holidays: bring back the out of office panel in threads
task-2277511

closes odoo/odoo#62638

X-original-commit: d9aa362914945e6cb095b04fa94cfb3469abd907
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-12-02 11:03:39 +00:00
Sébastien Theys 8ee21a9cd0 [FIX] mail: fix mention suggestion order and skip intermediate rpc
task-2387825

closes odoo/odoo#62639

X-original-commit: 661f687256995452756d6396308bcc167a5dcb9f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-30 17:14:07 +00:00
Sébastien Theys 5cfc62cb33 [FIX] mail: prevent from closing an already deleted chat window
task-2394789

closes odoo/odoo#62626

X-original-commit: c32a3e9cbe0323e0b1fcc70b1438e9a56185493c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-30 15:26:02 +00:00
Didier (did) 31e015f80f [FIX] mail: mark document as read when open
task-2387820

closes odoo/odoo#62429

X-original-commit: fe3dbfb77eb403bb6eb69cd9d667fd8baa714ff7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-26 15:29:28 +00:00
Didier (did) e68ccce1c2 [FIX] mail: attach the dropzone to the chatter
Before this commit the dropzone was relative to div.content. This would create
some bad position where the dropzone was covering the form view but not the
chatter.

task-2389929

closes odoo/odoo#62402

X-original-commit: bb650a9a1f4ff8280bd1e3467624991bc87517b9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-26 13:06:42 +00:00
Didier (did) 756e3daa00 [FIX] mail: avoid notification if the channel is not a chat.
task-2387822

closes odoo/odoo#62348

X-original-commit: 8ad230ad64557798df09e28677f05a9f41773ead
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-25 16:37:14 +00:00
Sébastien Theys 2522a7b35e [FIX] mail: remove illegitimate followers from chats
task-2392114

closes odoo/odoo#62349

X-original-commit: 26a76f81590ae92f5bec51be1441d6779b1afe85
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-25 16:37:40 +00:00
Didier (did) 1df1e39139 [FIX] mail: refresh activity list after editing and activity.
It's possible to create a new activity when editing a existing activity (done
and schedule next). In this case, we must refresh the activity list, otherwise
they wont be in the chatter.

task-2389961

closes odoo/odoo#62333

X-original-commit: 26a2c047a2757c600b3128fe753fa1328043a245
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-25 14:13:18 +00:00
Xavier Dubuc 5987bb14e1 [FIX] mail: fix chat window shift operations titles
They are now language direction dependent.

task-2314205

closes odoo/odoo#61713

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-25 11:00:59 +00:00
Julien Giannone 01b5bf1442 [FIX] mail: fix text selection in composer using SHIFT and arrow keys
This commit corrects the faulty SHIFT + ArrowKey selection behavior.

task-2388650

closes odoo/odoo#62251

X-original-commit: d498f899aa2ef81acbcd035896b9fcc912e4d52b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-24 14:24:48 +00:00
Sébastien Theys 5ab794cf30 [FIX] mail: avoid adding non-members on mention in channels
task-2392010

closes odoo/odoo#62242

X-original-commit: 0a3fe0a513abbde8f74d59de522a216035cdcd98
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-24 12:52:37 +00:00
Priyanka Kakadiya f285907c7d [FIX] mail: added test for no suggested recipient in lognote
LINKS

Task - 2371744
PR - https://github.com/odoo/odoo/pull/61388

closes odoo/odoo#62180

X-original-commit: 9cfb82dd4a9f3bef94960abd40c648373eff4ea9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-23 13:18:59 +00:00
Priyanka Kakadiya 8b525d01a8 [FIX] mail: focus should be on composer after post message
PURPOSE

When sending a message by clicking on the "send" button manually, the focus
should stay on the text input (and the mobile keyboard should stay open), so
that it is possible to quickly send another message afterward without having to
re-click manually on the text input

SPECIFICATION

the focus should be set to composer automatically after sending a message

LINKS

closes odoo/odoo#62179

Taskid: 2372546
Pr: https://github.com/odoo/odoo/pull/61226
X-original-commit: 6cc5d4ae9ed2d7dbbad51ae720365730c8a416ac
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-23 13:18:32 +00:00
Sébastien Theys 5f42a13bfa [FIX] mail: prevent crash when initializing many failures
The test highlighting the current issue has been posted in PR
https://github.com/odoo/odoo/pull/62076

But it is not included as part of the current PR because it is too slow to
execute, while it is unlikely we will break this fix as it is not influenced by
anything else in the code.

The reason why we need this change is because on some database, including ours,
we have users who have more than 1000 failures still unresolved and they are
all returned at init.

closes odoo/odoo#62173

X-original-commit: 32ed8125aeb356e568d3c49ef7a04c0ff9e36169
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-23 12:28:54 +00:00
Sébastien Theys 385a776a1f [FIX] mail: avoid empty seen indicator
`MessageSeenIndicator` sub-component should not be rendered if the thread does
not support seen indicators.

The issue is manifesting because the otherwise empty indicator has a margin,
which is adding more space than expected before the following element.

closes odoo/odoo#62172

X-original-commit: 4e0e8a415ae2175cd68e514cff33b2bffeb99db7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-23 12:28:26 +00:00
Julien Giannone 225ae4d53e [FIX] mail: Sidebar channel find shows all channels
When searching for a channel in Discuss, the search results include
all matching channels even those user is already member of

task-2347837

closes odoo/odoo#62161

X-original-commit: 884bebb0f549dc4385cec9542f74e0bba64ccb08
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-23 11:39:50 +00:00
Didier (did) 831a83f273 [IMP] mail: implement read only field
Fields can now be marqued as read only.
```
stringifiedDomain: attr({
    default: '[]',
    readonly: true,
}),
```

closes odoo/odoo#60086

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-23 09:17:40 +00:00
Didier (did)andSébastien Theys 544cec54d8 [FIX] mail,sms: avoid event propagation on avatar click in message list
Before this commit, when a user click on the author avatar inside the message
list, it trigger the o-clicked for the message.

task-2341603

closes odoo/odoo#62125

X-original-commit: 69432fbe47f8cf6ca89f018e38961fdeba8b0fc7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2020-11-20 18:33:53 +00:00
Xavier Dubuc 2cf0390100 [FIX] mail: prevent multiple send of message by spamming send button
task-2388702

closes odoo/odoo#62123

X-original-commit: 909b66883c1085c3eba59452fd89f1328948acab
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20 18:18:11 +00:00
bit-odoo a37c11e113 [FIX] mail: new message should not suggest partners without users
Before this commit:

New message from "messaging menu -> chat window" or "new chat" in discuss,
should not suggest partners that don't have a dedicated user.

After this commit:

It will not suggest partners that don't have a dedicated user.

Task-2363463

closes odoo/odoo#62116

X-original-commit: 13819e6afab1d30b644e79cfb1112478cfa5b32d
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20 16:55:17 +00:00
Didier (did) 66de13d461 [IMP] mail,hr: implement required field in JS models
Fields can now be marqued as required inside a field definition. If the field
value is `undefined` or updated to `undefined`, an error will be throw.

```
stringifiedDomain: attr({
    default: '[]',
    required: true,
}),
```

task-2323665

closes odoo/odoo#59094

Related: odoo/enterprise#13883
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-16 13:41:13 +00:00
Paul Morelle 05b151d4e4 [FIX] mail: avoid a stack overflow during loading
When the amount of mail messages is big enough (about 1500?), the
recursion goes deeper and deeper, until the Javascript limit raises an
infinite recursion error.

This commit fixes the issue by avoiding to run an inner
_flushUpdateCycle with the update if the change is not needed, so the
second time that it is reached it does not start a new update, which
would have run another flush update cycle.

closes odoo/odoo#62096

X-original-commit: 14b1bbb248b39e0ddef4f3eb1f0f130f650ebdd4
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20 13:36:00 +00:00
Didier (did) a24cd324c0 [FIX] mail: fix image width inside the chatter
Web editor hard code the width inside the image html. This `max-width`
constraint the image inside the chatter and avoid unwanted horizontal scrollbar.

task-2389432

closes odoo/odoo#62095

X-original-commit: 352e868f320344b06c4d44fd2df452080446dbb6
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20 13:35:36 +00:00
Sébastien Theys 2399b4546b [FIX] mail: fix messaging menu counter by ignoring non-pinned threads
Indeed the non-pinned thread are not displayed in the menu and should not be
taken into account for its counter either.

task-2389824

closes odoo/odoo#62045

X-original-commit: 938d621db5355064e51c4b5e57238a91570aa685
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-19 18:02:28 +00:00
Ipsita Borisagar 397773cf8a [IMP] mail: dynamic placeholder for text input
PURPOSE

The motive is to change dynamic placeholder by giving context to the user for
indicating whom he/she is writing.

SPECIFICATION

Changing placeholder "Write Something..." by "Message person/group..." for chat
and "Message #channel..." for channel.

LINKS

PR https://github.com/odoo/odoo/pull/60582
Task-2361155

closes odoo/odoo#60582

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-17 06:16:34 +00:00
Alexandre Kühn 6322804274 [FIX] mail: prevent safari from shrinking notification list items
Task-2388565

closes odoo/odoo#61968

X-original-commit: 49acaa4f5bf6ce48dec9285d4acce70a7d940d42
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-18 18:01:10 +00:00
Paul Morelle 16bee6a86e [FIX] mail: select first contact in new message box
In previous versions of Odoo, in the New message box, typing a few
letters of the name of your recipient and pressing Enter would
automatically select the conversation with this contact.

Since 14.0, one has to select the first result with the Down key.
This commit restores the previous behavior by using the
[`autofocus`](https://api.jqueryui.com/autocomplete/#option-autoFocus)
option.

closes odoo/odoo#61967

X-original-commit: addd392a1b5f7e569c65a4503152ba0bdfe49eb3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-18 17:16:35 +00:00
Sébastien Theys 44057dce37 [FIX] mail: avoid marking hint as resolved before message list render
This change highlighted issues with the async behavior of `useUpdate`, which
was no longer necessary and therefore reverted.

This in turn highlighted issue with animation of chat window unfolding, making
restoring of scroll position not work as intended due to the message list not
having its whole height available during some time after render. This animation
being minor (and even annoying in some cases) it was decided to remove it.

task-2387729

closes odoo/odoo#61962

X-original-commit: f22c34e7f61f7f8ac5b9ab7f9579cc4e6dd0e334
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-18 16:28:30 +00:00
bit-odoo a53a0f593e [FIX] mail: Fix the issue with activity widget dropdown scrollbar
This commit fixes the issue with dropdown of activity in kanban.
The activity dropdown was cut with document inspectorbar in document
kanban view due to data-boundry window on dropdown.

Note:
Dropdown of list activity was cut on the list view and to fix that
commit[1] was done but it has side effect on document kanban view.
another fix was done in commit[2] so now commit[1] is not useful so
here revert that commit.

[1] - https://github.com/odoo/odoo/commit/cef57b930b27cb487973f251797c93ea3967a5b3
[2] - https://github.com/odoo/odoo/commit/a98f0621169144f53f4ebc9361f3b7c6b60556c8

closes odoo/odoo#61895

Taskid: 2336146
X-original-commit: 6b32689b00e96d9cfc165fe31a3a121d97874321
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-17 18:45:50 +00:00
Didier (did) edc8f85c3a [FIX] mail: always hide the dropzone when something is dropped
Before this commit, when an invalid element was dropped (e.g. dragging a
mention) the drop area freeze and make the UI unusable.

task-2373971

closes odoo/odoo#61792

X-original-commit: 629b54dc1249c77d1e30240c0b5a91e22a1ae110
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-16 15:13:45 +00:00
Sébastien Theys 91bbdf41f4 [FIX] mail: fix race conditions, especially with scroll
The `_update` of some components must take place before the `_update`
of other (usually sibling) components that might directly influence their
layout. This is in particular the case for `_update` that are relying on height.

Prevent force save of scroll position if there are pending hints to adjust it,
and prevent pending hints from overriding new scroll value.

Prevent flicker with message date.

This should fix all known issues related to incorrectly saving or restoring
scroll position.

task-2344226
task-2358066
task-2369332
task-2372339
task-2373741

closes odoo/odoo#61791

X-original-commit: 2002c6a599a685f4a18fc670a9f7992c8d595c0f
Related: odoo/enterprise#14759
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-16 15:40:10 +00:00
Sébastien Theys dd7241c890 [FIX] mail: remove regex from mentions
That should fix all detection issues once and for all.

task-2366680

closes odoo/odoo#61528

X-original-commit: cf6961fba38ed619bf7bfb908c3aadde0f694648
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-09 10:49:34 +00:00
Didier (did) 4995c6b76e [IMP] mail: add test for channel mention and channel link
task-2366680
PR https://github.com/odoo/odoo/pull/60593

X-original-commit: 46be4866adacafdd147c799d1cc91e27a88a99d0
2020-11-09 10:49:34 +00:00
Didier (did) 4b8ea4d84d [FIX] mail: wrap to new line spaces to avoid bad mention detection
X-original-commit: dc15021752ec83d4f36127b1bf75bece1074757d
2020-11-09 10:49:33 +00:00
Didier (did) 3b48fe700f [FIX] mail: escape the mentionned channels before matching them
Escaping the match name is escaping an already escaped string from
`postMessage`. How ever we need to escape the string from
`this.mentionedPartners` and `this.mentionedChannels` since they are matched
with an escaped string.
This fix the bug when mentionning a channel with `&` in it's name.

task-2366680
PR https://github.com/odoo/odoo/pull/60593

X-original-commit: fecd2b28309b0fa4e5ecb8c7d26f6a335036e740
2020-11-09 10:49:32 +00:00
Didier (did) a3c26a1498 [FIX] mail: detect space inside channel name
task-2366680
PR https://github.com/odoo/odoo/pull/60593

X-original-commit: bbfaf1f805c90f1c9bf87e6a06481ecc88bc24b9
2020-11-09 10:49:31 +00:00
Nicolas Galler 53a1821d3d [FIX] mail: don't refresh dirty record on message post
Behavior prior to this commit:

When editing a lead, if we log a note, it will refresh the record and
cause the changes to be lost.  In version 13, it would only refresh the
record if `@` mentions were added.

Behavior after this commit:

The record will only refresh if it is not dirty.

Note:

It is not clear why the record would in fact ever need to refresh
as there is no visible change on the lead form when a note is logged,
whether or not followers are added (the message thread, which shows the
number of followers, refreshes regardless).  In this commit I chose the
approach which would cause the least change.  There is still a need for
a longer term solution to orchestrate the refreshes, which will take
place once the rest of the web application is converted to use Owl.

opw-2369162

closes odoo/odoo#61503

X-original-commit: 6d7058679869ba03e164993687c21b0bae12822d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2020-11-06 17:48:19 +00:00
Xavier Dubuc 48b25a5069 [FIX] mail: prevent load messages if already loading
task-2373952

closes odoo/odoo#61424

X-original-commit: a4c737eb1d45610f6ab70268d5134dc5ed00ba8d
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-05 14:57:43 +00:00
Didier (did) 0658995624 [FIX] mail: this self is unused
task-2286090

closes odoo/odoo#61418

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-05 14:14:59 +00:00
Achraf (abz) 5dbd4d79ee [FIX] mail: Don't send negative id via rpc
Issue

    - Install live chat and website
    - In incognito mode, send a message via live chat (as public user)
    - Log in the database

    Erro: Record does not exist or has been deleted. (Record: res.partner(-1,), User: 2)

Cause

    Guest with negative id are sent to the server

Solution

    Don't send negative id

opw-2371677

closes odoo/odoo#61407

X-original-commit: 5dfd793470deed9ab459ccb2d747511213bc5bf9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-05 13:15:23 +00:00
Didier (did) 1da252d0a3 [FIX] mail: backport fix from the required field PR
https://github.com/odoo/enterprise/pull/13883
task-2323665

closes odoo/odoo#61320

X-original-commit: 7ead0bf2e3e15ec161415bfa270a2c42a66fbbe3
Related: odoo/enterprise#14585
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-04 12:12:49 +00:00
Xavier Dubuc 3dd9c3b7f9 [FIX] mail: handle transient messages with (un)seen notions
task-2343887

closes odoo/odoo#61180

X-original-commit: 03481fd3df9bc53a17ba884ad4029ae46d7e54bf
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-02 14:56:57 +00:00