Commit Graph
3016 Commits
Author SHA1 Message Date
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
Martin Trigaux c59c10f1bc [FIX] *: correct typos and bad English
Courtesy of translators
Reexport .pot of modified modules

closes odoo/odoo#61010

X-original-commit: 62a18bdb372e234107fd2099a2df5f9e3a442c96
Related: odoo/enterprise#14489
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-29 19:23:41 +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
Hiral Bhavsar be01bbd97f [FIX] mail: marking activity done from form view
Before this commit:

When editing the activity, traceback while processing with buttons
"Done & Schedule Next", "Mark as Done" from the form view.

This is happening because when we process with these buttons it complete
the action of respective buttons and then the trigger will go on the close
window. Hence, we don't have activity data as "mark as done" remove
the activity.

After this commit:

Footer buttons will be processed as expected without any traceback.

Task-2357681

closes odoo/odoo#60174

X-original-commit: 623c5176a37ae5fd048d6bb10e742fac5caa6cf2
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-16 13:20:58 +00:00
Hiral Bhavsar 23ffc7f5b6 [FIX] mail, website_slides: fix while accept the request from the new attendee
Before this commit:

We have a new feature that if the course is private, and attendee make the
request to access the course it will create an activity for 'course responsible'.

Currently, after accepting the invitation request from the new user, it is still
not considered the user as an attendee and not displaying like 'You're enrolled'
to the respective users

After this commit:

The features of access invitation on courses will be workable.

Task-2328389

closes odoo/odoo#60135

X-original-commit: becf051f38fcf08d4a0aea758cb2758ad0f25bc3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-15 19:40:29 +00:00
Nasreddin (bon) bc4e06106d [FIX] mail: mail not sent because partner not find in chatter + unit test
Issue

	- Install "Project" module
	- Go to the chatter of any Task
	- Log the following message (by selecting the partner) then send:
	"test@test.com
	@marc Demo "

	Message is not sent.

Cause

	When parsing the content, the match result is "@test.com\n@Marc Demo" due
	to no space between the two mentions

Solution

	Add space after line break (only when parsing selection).
	In this case, it will match with 2 mentions instead:
	"@test.com\n" and "@marc Demo "

	For _generateMentionsLinks step, add a space after '</br>',
	it will match 2 mentions but we remove the ones that end
	with '</br>'. This last fix is to avoid having a non-mention
	string containing '</br>' (for example), and therefore not
	having them escaped in final message content.

opw-2322577

closes odoo/odoo#60128

X-original-commit: 8f12c025e05e5a3a7cf3c5fa8c2696ec99e2fa07
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-15 16:51:34 +00:00
Sébastien Theys 1ff12ed7d1 [FIX] mail: open mentions below composer in chatter
opw-2358094

closes odoo/odoo#60019

X-original-commit: 8c9792d811feeb3080fa1106d358112c630d19f7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-14 15:13:09 +00:00
Kamesh Patel c8ba009c6c [FIX] crm,mail: clear breadcrumb when redirecting to activities from systray
Before this commit:

When accessing activities from the systray, any existing breadcrumb-item should
be clearer.

After this commit:

Clear breadcrumb-item when access activities from the systray.

Task-2342246

closes odoo/odoo#60018

X-original-commit: a9b32448c4a6227ef8e729436cb793ea9c24c289
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-14 15:12:42 +00:00
Thanh Dodeur 840728b4dc [FIX] mail: adds shadow to RPCs
This commit adds shadow to RPCs that are not supposed to be blocking.

task-2352703

closes odoo/odoo#60017

X-original-commit: 4274a061ff1498f647580c38c7048da8a8cb0a9c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-14 15:11:58 +00:00
Thanh Dodeur c8ed4697f6 [FIX] mail: inverts the zoom scroll direction of the attachment viewer
This commit inverts the zoom direction of the scroll wheel in the
attachment viewer to respect the behaviour of before the refactor.

part of task-2171884

closes odoo/odoo#60009

X-original-commit: 3d9e2e031ea2e92a50769cc69fe37741d32b6820
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-14 14:27:19 +00:00
Thanh Dodeur 461c3fa91b [FIX] mail: corrects wrong url formatting for attachment download
This commit changes the url formatting of the `services.navigate` in
the attachment viewer. Before this commit, the resulting URL was
erroneous which prevented download and lead to a 404 error.

part of task-2171884

closes odoo/odoo#60003

X-original-commit: b11535bb26ad9a1fd96ec616201eb67c89597cdc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-14 13:37:09 +00:00
95d0ca4b2c [REF] web_editor,web: adapt to new jabberwock editor
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Sébastien Geelen <sge@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2020-10-14 10:29:09 +00:00
Sébastien Theys 5af18fbd9e [FIX] mail: ensure discuss composer at the bottom if no message list
task-2358093

closes odoo/odoo#59735

X-original-commit: 07159984999b14d1566706a62d54594753ad9f93
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-12 11:04:07 +00:00
Pierre Paridans a84e37bb8a [FIX] mail: plain-text messages word-wrap in Discuss UI
When a user sends a plaintext email to a mail-enabled channel, the
rendering of this message in Discuss have present a horizontal scroll
when the text contains long sentences.

This commit fixes it by enabling wrapping of the line's word to fit its
container size and prevent horizontal scrolling.

Note: the required CSS rules were already present since odoo/odoo@0e7e18ff71
but a wrapper element (with the class `.o_thread_message_content`) was
introduced in odoo/odoo@4685e4bc7f and
merged between the testing of the fix above and its actual merging in the
Odoo codebase, making it ineffective. We only have to properly re-enable
it.

opw-2341485

Related task ID: 34931

closes odoo/odoo#59719

X-original-commit: 5e66ca8d2c970eed999782bdd59e9082f3967833
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-10-12 08:42:49 +00:00
Xavier Dubuc ec3f5cdaf8 [FIX] mail: ask for confirmation before attachment deletion
also hide all messages with empty body and no attachments

task-2282322

closes odoo/odoo#59675

X-original-commit: 60ae42dcda777cd66e4e421dbc02f9ef12a430ef
Related: odoo/enterprise#13974
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-09 17:28:17 +00:00
Sébastien Theys a8dad56d6b [FIX] mail: fix discuss search filters and related issues
- don't reset `stringifiedDomain` when changing thread (this led to the
  control panel displaying obsolete filters)
- refresh non-main cache that are currently displayed when there is a known
  change of messages in the same thread's main cache
- refresh non-main-cache on displaying them, to fetch potentially new messages
- fix discuss "select all" conditions

task-2171873
task-2282374

closes odoo/odoo#59644

X-original-commit: b89dc5f949b3ad062fc4197a4152066c207e1bf9
Related: odoo/enterprise#13962
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-09 12:56:24 +00:00