summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models
AgeCommit message (Collapse)Author
2021-05-26[REV] mail: fix a traceback when sending a message in a "email channel"std-odoo
Bug === Since 4da64b3f3c8dff88d8e0e01c65374590cc0bf4f7 , if multiple users of different companies are in the same channel, and if the type of the channel is "email", a traceback is raised when sending a message. Technical ========= "with_user" drop the SU flag and is not enough to bypass the multi company ACLs. Moreover, we do not want to send a "channel_seen" bus notifications and we can mark the message as seen on the JS side directly. Changes ======= So now, the traceback is not raised anymore in that case, and the message is marked as seen if the receiver has the web client open. But, if the receiver has not the web client open, when he will login, the message will not be marked as seen. This can be improved but at the moment we just want to revert the fix that cause the traceback and fix the issue in most cases. Task 2427790 closes odoo/odoo#65185 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-21[FIX] mail: chat window should remain folded on new messageDhruv Patel
If the chat window was initially folded and when a new message is received the chat window automatically unfolds. it is annoying having a window that pops up each time a new message is coming while having folded it once. So, It should remain folded when a new message is received if the chat window is already folded. Task : 2522141 closes odoo/odoo#70737 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-05[FIX] mail: display default name for followers for "other address" partnernounoubensebia
Display the default name (the one displayed in the kanban view) for followers replacing the False value for "other address" partners, this way the user won't get confused, furthermore, this fix won't require the name to be mandatory for this type of contacts. Task-2514244 closes odoo/odoo#70391 X-original-commit: 4c1271738daa039e79a11646fef3f4264e4d96d2 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-26[FIX] mail: command suggestion should only show if '/' is first charPriyanka Kakadiya
PURPOSE: command suggestion should only open if command is the first char. SPECIFICATION: command suggestion should only open if command is the first char. Task-2487518 closes odoo/odoo#68376 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26[FIX] mail: fix attachment preview for previewable filesXavier Dubuc
task-2412150 closes odoo/odoo#64072 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26[FIX] mail: do not show typing when using a / commandPriyanka Kakadiya
PURPOSE: Currently typing status is sent when typing a command. SPECIFICATION: Typing status should not be sent when typing a command. Task-2363267 closes odoo/odoo#66821 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-10[FIX] mail; hr: restore faster and more accurate mention suggestionsXavier Dubuc
The code from v13 used to look for partners in JS before making the RPC, which was much faster, and also gave better results by returning partners that were already known and therefore more likely to be selected. The same logic is reintroduced here, and further improved to take into account all known partners and sort them according to the likeliness they will be selected based on various criteria. task-2413776 closes odoo/odoo#64161 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Co-authored-by: Sébastien Theys <seb@odoo.com>
2021-03-10[FIX] mail: fix keyboard shortcut issue for small screenPriyanka Kakadiya
Current behavior before PR: When having a small screen, the composer in a chat window has no actual shortcut to send the message. Desired behavior after PR is merged: 'CTRL-Enter' keyboard shortcut will work for small screen size. LINKS: PR https://github.com//pull/65241 Task-2446076 closes odoo/odoo#65241 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-25[FIX] mail: this.env.services.bus_service is undefinedAlexandre Kühn
Before this commit, a page reload or a redirect could raise following error: ``` Uncaught (in promise) TypeError: this.env.services.bus_service is undefined ``` This happens due to `Messaging` model relying on `bus_service` in its teardown method `_willDelete`. This is sometimes unsafe because the bus service may not have been deployed yet. Task-2468469 closes odoo/odoo#66818 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-23[FIX] mail: Don't log unhandled notificationLucas Lefèvre
The `mail` module logs bus notifications it does not handle. However, some notifications are not meant to be handled by `mail` and it's perfectly fine. This commit removes the log to avoid useless noise in the console. closes odoo/odoo#66661 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-15[FIX] mail: prevent message separator for new conversationsIpsita Borisagar
Before this commit: When a new conversation is initiated, the 'new messages' separator is displayed. This looks a bit weird as there is no history of conversation and thus no older messages from which new messages should be separated. After this commit: The 'new messages' separator will not be displayed in new conversations. LINKS PR https://github.com/odoo/odoo/pull/65952 Task-2453511 closes odoo/odoo#65952 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-12[FIX] mail: (mobile) Prevent server sync for open/close stateJulien Giannone
This commit prevents the opening/closure of a channel on mobile when the action is performed on desktop and reciprocally closes odoo/odoo#64599 Tasks-id: 2267593 Related: odoo/enterprise#16296 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-12[FIX] mail: fix new message chatwindow issuePriyanka Kakadiya
Current behavior before PR: When looking for a user through the new message chat window, if there is already a chat open for this user, the new message window is still open on selecting the user. Desired behavior after PR is merged: when opening a chat from a new message, if the chat with this user is already open then it will close the new message chat window on selecting the user. LINKS: PR https://github.com/odoo/odoo/pull/65851 Task-2449118 closes odoo/odoo#65851 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-11[FIX] mail: improve subject of message in inboxPriyanka Kakadiya
PURPOSE Displaying the subject when the name of the record is exactly the same is redundant and crowds the interface needlessly SPECIFICATION Subject should only be displayed if it is different than the name of the record LINKS closes odoo/odoo#61044 Taskid: 2363130 Pr: https://github.com/odoo/odoo/pull/61044 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-11[IMP] mail: notify user after subscription preference changesDhruv Patel
Currently, the user doesn't receive any feedback or notification when updating his subscription preferences. Therefore, he might be prompted to open the subscription modal again to double-check that his modifications were correctly applied or not. With this commit, We are now displaying screen notification with success message after successfully applying the changes. Task : 2445481 closes odoo/odoo#65514 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-01-28[FIX] mail: make Inbox counters more reliable in mark as read flowsSébastien Theys
- Send the new Inbox counter when marking as read, to guarantee the JS has the correct value (instead of having to guess it which was impossible when an arbitrary domain was given to the method). NOTE: Manual increment is kept on receiving a new Inbox message because that one was reliable and it would have been more tricky to compute the new counter for each target partner (mark as read is one user doing an action for himself, whereas new message is from another user to potentially many different users). Generic counter for threads is also not sent on every change for similar reasons. - Refresh Inbox automatically when some messages are marked as read and there are more message on the server than currently loaded. - Remove confusing (and impossible to maintain) counter on non-origin threads (in particular channel followers). This behavior in JS was not consistent with the server which always counted only origin thread (model/res_id). task-2446302 closes odoo/odoo#65161 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-01-26[FIX] mail: avoid hiding non-text messages that are not emptySébastien Theys
task-2447695 closes odoo/odoo#65061 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-01-22[FIX] mail: fix inbox mark all as read on thread viewSébastien Theys
task-2426357 task-2426366 closes odoo/odoo#64009 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-01-15[FIX] mail: prevent composer cursor from randomly changing positionSébastien Theys
task-2388600 closes odoo/odoo#62446 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-01-20[FIX] mail: more consistent async handling of scroll featureSébastien Theys
task-2333535 task-2388676 closes odoo/odoo#64505 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-01-18[FIX] mail, im_livechat, snailmail: use findFromIdentifyingDataSébastien Theys
find is O(n) and findFromIdentifyingData is O(1) task-2440693 closes odoo/odoo#64712 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-10[IMP] mail: save/restore the feedback in the activity modelDidier (did)
task-2397404 closes odoo/odoo#62878 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-21[FIX] mail: adapt mail notificationThanh Dodeur
Before this commit, some notifications in mail were not following the changes made in odoo/odoo#52826 . task-2278579 closes odoo/odoo#63614 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-10[FIX] mail: mark all needaction as read when opening the threadDidier (did)
This was the case before the refactoring. task-2411114 closes odoo/odoo#62942 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-15[FIX] mail: prevent messaging menu from hiding home menu in mobileSébastien Theys
task-2330277 closes odoo/odoo#63235 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-11[Fix] mail: incorrect activity creation dateAdrien Widart
After an activity creation, if a user checks the activity's information, the creation date will be the current date. To reproduce the error: 1. Add an activity (e.g. a TODO activity) 2. In log notes, click on the activity's information icon => The "Created" field is actually the current date and not the activity's creation date. OPW-2412967 closes odoo/odoo#63211 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-10[FIX] mail: prevent autofollow when using mentions in notesSébastien Theys
task-2415579 closes odoo/odoo#63196 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-10[FIX] mail: handles unlink button spam on attachmentsThanh Dodeur
Before this commit, attempting to delete attachments multiple times could result in errors, especially on slow networks. This commit fixes this issue. task-2363522 closes odoo/odoo#61017 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-12-09[FIX] mail: only highlight needaction on their origin threadSébastien Theys
task-2391170 closes odoo/odoo#62981 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-07[FIX] mail: fix unfedined record when pressing "end" key in mentionsDidier (did)
task-2411756 closes odoo/odoo#62861 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-12-07[FIX] mail, im_livechat: properly handle multiple public partnersSébastien Theys
task-2391334 closes odoo/odoo#62956 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-05[FIX] mail: ignore partner notification with unsupported `type`Alexandre Kühn
Task-2411800 closes odoo/odoo#62930 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-02[FIX] mail: remove html from new message notificationSébastien Theys
task-2388659 closes odoo/odoo#62442 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-02[FIX] mail: set href on notification link.Didier (did)
This allow the user to open link in new tabs with middle click task-2387837 closes odoo/odoo#62304 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-30[FIX] mail: fix mention suggestion order and skip intermediate rpcSébastien Theys
task-2387825 closes odoo/odoo#62393 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-30[FIX] hr_holidays: bring back the out of office panel in threadsXavier Dubuc
task-2277511 closes odoo/odoo#61586 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-25[FIX] mail: remove illegitimate followers from chatsSébastien Theys
task-2392114 closes odoo/odoo#62309 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-25[FIX] mail: avoid notification if the channel is not a chat.Didier (did)
task-2387822 closes odoo/odoo#62089 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-25[FIX] mail: refresh activity list after editing and activity.Didier (did)
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#62252 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-24[FIX] mail: fix text selection in composer using SHIFT and arrow keysJulien Giannone
This commit corrects the faulty SHIFT + ArrowKey selection behavior. task-2388650 closes odoo/odoo#62059 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-24[FIX] mail: avoid adding non-members on mention in channelsSébastien Theys
task-2392010 closes odoo/odoo#62230 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-20[FIX] mail: prevent crash when initializing many failuresSébastien Theys
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#62090 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-23[FIX] mail: Sidebar channel find shows all channelsJulien Giannone
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#60063 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20[FIX] mail: prevent multiple send of message by spamming send buttonXavier Dubuc
task-2388702 closes odoo/odoo#61993 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-18[FIX] mail: new message should not suggest partners without usersbit-odoo
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#61614 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20[FIX] mail: avoid a stack overflow during loadingPaul Morelle
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#62076 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-19[FIX] mail: fix messaging menu counter by ignoring non-pinned threadsSébastien Theys
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#62033 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-16[FIX] mail: fix race conditions, especially with scrollSébastien Theys
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#61054 Related: odoo/enterprise#14736 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-06[FIX] mail: remove regex from mentionsSébastien Theys
That should fix all detection issues once and for all. task-2366680 closes odoo/odoo#60593 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-02[FIX] mail: wrap to new line spaces to avoid bad mention detectionDidier (did)