Commit Graph
2976 Commits
Author SHA1 Message Date
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
Nasreddin (bon) 9b90b933ed [FIX] mail: mail not sent because partner not find in chatter
Issue

	Partner not found if multiple breakline in message.

Cause

	'\n' not replaced by '\n ' globaly.
        '<br/>' not replaced by '<br/> ' globaly.

Fix of this commit : https://github.com/odoo/odoo/commit/902302598e98efab52d61979e85def6d025ff2ab

opw-2322577

closes odoo/odoo#61145

X-original-commit: 64a1a7b78782cb255a47d2e7d55d605c8175b6ce
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-11-02 12:19:30 +00:00
Sébastien Theys 1bdb557520 [FIX] mail: fix height overflow of mentions
Due to mentions being positioned inside thread view and messaging list (when in
chat window) and those two elements having `overflow: auto`, it is necessary to
give mentions an appropriate max height to prevent overflow.

This makes it necessary to add a scrollbar to the mention list, which makes
scrolling into view of active item necessary when navigating with the keyboard.

Also removed activating item on mouse over to prevent activation of wrong items
when navigating with keyboard if the cursor is unfortunately over another item.

task-2275828

closes odoo/odoo#61084

X-original-commit: 85384dd0bb8de5e98e585cb8610d58b11e601520
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-30 17:27:46 +00:00
Sébastien Theys b45b4acab6 [FIX] mail: fix width overflow of mentions
task-2275828

X-original-commit: be56641d88fe25bb048a174a327a8b2890e7ae0f
2020-10-30 17:27:45 +00:00
Xavier Dubuc e0d849ba7c [FIX] mail: make only composer as fixed in chatter
task-2282325

closes odoo/odoo#61077

X-original-commit: 9d90fd9a2a65ab1ff338bb109426ca93075937fa
Related: odoo/enterprise#14506
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-30 16:39:24 +00:00
Sébastien Theys 06ca3e8d0d [FIX] mail: remove chat window auto-focus on click
This causes more trouble than it's worth, especially with mobile keyboards.
It also prevents from selecting any text in chat window threads.

task-2372553
Part of task-2277543

closes odoo/odoo#61078

X-original-commit: 4ec26d985f33e1fa391c312b89fc611b8d688c96
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-30 16:40:03 +00:00
Xavier Dubuc eac3c08ce2 [FIX] mail: fix handling of lastVisibleMessage in channel seen condition
also fix a problem with composer.hasFocus field not always correctly
updated (e.g. when switching from a channel to another in discuss)

task-2278915

closes odoo/odoo#61007

X-original-commit: ecb56a6893dd7b76402c2262fb93f8dea079fde0
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-29 16:35:37 +00:00
Thanh DodeurandSébastien Theys a2d216a80d [Fix] mail: ensures composer cleanup on message post
Before this commit, the state of the composer was not properly saving
its state when focusing out, which caused erroneous composer states
in some corner cases, like when posting messages on mobile in some
browsers. This commit fixes this issue.

opw-2366374

closes odoo/odoo#60913

X-original-commit: 8e79fefdb9990a6480fdae2684e07799e5439b06
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2020-10-28 14:56:47 +00:00
Sébastien Theys abb7d2dab9 [FIX] mail, im_livechat: avoid artificially delaying messaging
Don't delay the insert of partners or channels until it actually takes too much
time.

Don't await `_initMentionPartnerSuggestions` as it is just nice to have.

task-2371485

closes odoo/odoo#60911

X-original-commit: e78805fc3ae9b5dbbf72667e5bd62e5c5346cc53
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-28 14:55:47 +00:00
Xavier Dubuc 59ecc564e0 [FIX] mail: do not consider message with subtype as empty
task-2362022

closes odoo/odoo#60890

X-original-commit: 65ffb692164d5370411059dca63223c08c8dc81f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-28 11:38:16 +00:00
Priyanka Kakadiya c97e6c1a2f [IMP] mail: remove empty context from rpc
PURPOSE

we need to pass empty context so it can be overriden in session.js. we should be
able to not specify any context and let session handle it.

SPECIFICATION

- removed empty context from thread rpc
- as there is already managed empty context in session, so no need to manage
  empty context in rpc

LINKS

Task 2243187
PR https://github.com/odoo/odoo/pull/54512

closes odoo/odoo#54512

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-28 05:33:31 +00:00
Xavier Dubuc 454ecb46c9 [FIX] mail, im_livechat: allow to reopen closed chat in discuss
task-2346862

closes odoo/odoo#60859

X-original-commit: 063aa1deccdd6b53d1ab7de68921c95ecf60581c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-27 17:14:00 +00:00
Achraf (abz) 6f8d9ab39b [FIX] mail: Do not send log notes to customers
Issue

    - Install "CRM"
    - Create new lead
    - Set X to customer
    - Send a log note

    X receives log notes by mail

    Reproducible on Project and CRM

Cause

    The customer sends a list of partners who will receive an email
    even when it is a log note

Solution

    Send the list of partners only when it is an email and not a log note

opw-2369280

closes odoo/odoo#60855

X-original-commit: 4e660dfdf40a36eed7123bcea2452874238fddd8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-27 16:23:42 +00:00
Priyanka Kakadiya c3c01633ce [IMP] mail: open partner/employee form on chat header click
PURPOSE:

It often happens that someone will send you a message, but you don't actually
know who is the person within the company. In this context, it would be
practical to have direct access to that person's public user or employee form
in order to get more information.

SPECIFICATIONS:

on hover, display the name of the user is bold + underlined
if the user clicks on the name, redirect to:
 - the employee form if the hr module is installed and if the user is
   linked to an employee
 - else redirect to the partner form

LINKS:

closes https://github.com/odoo/odoo/pull/58754
task 2252924

closes odoo/odoo#58754

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-27 04:56:29 +00:00
Thanh Dodeur bfd018fd8c [FIX] mail: prevents crash when completing self repeating activities
Before this commit, completing an activity that was automatically
generating new activities was causing a crash as no action is returned
when they are completed.

This commit fixes this issue by handling the case where no action is
returned.

opw-2361674

closes odoo/odoo#60732

X-original-commit: ce6f6fb4e04746d28e1b959d50f50a855c7a3049
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-26 11:49:00 +00:00
Thanh Dodeur 56c222c8e6 [FIX] mail: adds a test for the chatter of new records
This commit adds a test for the fix odoo/odoo/pull/58769 that
ensures that the chatter is properly cleared when creating a new record.

task-2348472

closes odoo/odoo#60731

X-original-commit: 5e46850072f142fb17b72d8738dc4f1c60e3a786
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-26 11:48:30 +00:00
Didier (did) c9ff3672ca [FIX] mail: force the model when creating basic thread
fw of ca6cc05cec13f2e3f1d6555491c3180e9ff3ace2

closes odoo/odoo#60645

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23 15:34:07 +00:00
Didier (did) dd91d2a6c2 [FIX] mail: incorrect value for partner id.
fw of b70e3456baf22fd08ed037bdc1b19214803ac51c
2020-10-23 15:33:45 +00:00
Didier (did) e0075664fd [FIX] mail: handle the case when the user id isn't and array.
fw of 9be44c5de2b86d56871a1ef5326ada24afceec6c
2020-10-23 15:33:45 +00:00
Julien Giannone 461ae4fc5e [FIX] mail: filter commands used in composer based on channel type
closes odoo/odoo#60644

Task-id: 2343850
X-original-commit: caaf436bdf1f72634bf8a83672c6f683e0013713
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23 15:04:52 +00:00
Didier (did) 66dca07144 [FIX] mail: add test to the suggested recipient feature
task-2343795

closes odoo/odoo#60625

X-original-commit: a76a576ad25c928e006812cf20423a592de03b30
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23 13:19:20 +00:00
Sébastien Theys 562fdd67f2 [FIX] mail: do not return members of channels in channel_info
This PR has 3 parts:

The members fix itself, which is necessary for performance reasons especially
at init messaging, as per described in the task.

Adding the partner name in the typing payload, because due to not knowing all
members anymore, it is necessary to properly display who is typing.

Restrict restoring scroll position only if the corresponding scroll height is
available, to make the scroll feature and particularly the corresponding tests
more robust.

task-2360020

closes odoo/odoo#60616

X-original-commit: 91ce61ba568d83190e7ed2c168fd56101474683b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23 12:27:57 +00:00
Thanh Dodeur e77e205252 [FIX] bus, mail: fix im_status for archived partners
Before this commit, archived and deleted partners had not their
im_status being updated automatically. There were some issues
with this, notably:

- odoobot 'bot' status was not displayed in chatter
- im_status of partners becoming archived were not updated.

This commit fixes both issues.

task-2329591

closes odoo/odoo#60567

X-original-commit: 63b081c49da089c839479b807de8c0cea45221da
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-22 17:23:13 +00:00
Thanh Dodeur 0b8146c94f [FIX] mail: sets the z-index of dialog to the z-index of modals
This commit gives to o_Dialog the same z-index as modals, before
this commit, the dialog could be hidden or partially obstructed
by other elements.

part of task-2171884

closes odoo/odoo#60440

X-original-commit: b4de3c4e34500c9d4e3e2eef68c880643953f2ff
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-21 11:58:59 +00:00
Thanh Dodeur bd26e75f34 [IMP] mail: replaces window.location by services.navigate
part of task-2171884

closes odoo/odoo#59947

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-20 11:55:51 +00:00
Julien Giannone 5b98269eea [FIX] mail: no response on invalid command
This fix allows to send an invalid command as a normal message
to have it displayed in the messages list.

closes odoo/odoo#60191

Task-id: 2360504
X-original-commit: a748f66857d659db1a47d6c8ee6e4ac0c21d0361
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-16 15:44:35 +00:00