summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models
AgeCommit message (Collapse)Author
2020-10-23[FIX] mail: force the model when creating basic threadDidier (did)
closes odoo/odoo#60285 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-23[FIX] mail: handle the case when the user id isn't and array.Didier (did)
2020-10-23[FIX] mail: filter commands used in composer based on channel typeJulien Giannone
closes odoo/odoo#60052 Task-id: 2343850 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23[FIX] mail: add test to the suggested recipient featureDidier (did)
task-2343795 closes odoo/odoo#59989 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23[FIX] mail: do not return members of channels in channel_infoSébastien Theys
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#60091 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-22[FIX] bus, mail: fix im_status for archived partnersThanh Dodeur
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#60398 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-16[FIX] mail: no response on invalid commandJulien Giannone
This fix allows to send an invalid command as a normal message to have it displayed in the messages list. closes odoo/odoo#60165 Task-id: 2360504 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-16[FIX] mail: marking activity done from form viewHiral Bhavsar
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#59643 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-15[FIX] mail, website_slides: fix while accept the request from the new attendeeHiral Bhavsar
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#59504 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-15[FIX] mail: mail not sent because partner not find in chatter + unit testNasreddin (bon)
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#59648 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-14[FIX] mail: adds shadow to RPCsThanh Dodeur
This commit adds shadow to RPCs that are not supposed to be blocking. task-2352703 closes odoo/odoo#59991 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-09[FIX] mail: ask for confirmation before attachment deletionXavier Dubuc
also hide all messages with empty body and no attachments task-2282322 closes odoo/odoo#59672 X-original-commit: 60ae42dcda777cd66e4e421dbc02f9ef12a430ef Related: odoo/enterprise#13971 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-09[FIX] mail: fix discuss search filters and related issuesSébastien Theys
- 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#59631 X-original-commit: b89dc5f949b3ad062fc4197a4152066c207e1bf9 Related: odoo/enterprise#13958 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-08[FIX] mail: avoid useless (un)link when using replaceSébastien Theys
Side effect of this change: dependencies are not longer triggered when replace is not actually doing anything. task-2270780 closes odoo/odoo#59508 X-original-commit: 75a44675873d65fdf17f2205772b05a0f59bb42c Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-08[FIX] mail: channelId undefined on the message_seen_indicator modelDidier (did)
message_seen_indicator model doesn't have a field threadId, it use channelId. channelId is required since it's use inside the _createRecordLocalId function closes odoo/odoo#59489 X-original-commit: f82396cba884604603eea38e291422faebea2f58 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-07[FIX] mail: clean up relations between chatter and threadSébastien Theys
This will prevent various flicker when using previous/next. task-2243518 closes odoo/odoo#59375 X-original-commit: 1559e82e6b781601286003c2aff364dbb19c9bfc Related: odoo/enterprise#13868 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-02[FIX] mail, im_livechat: consider all init channels as pinnedSébastien Theys
task-2347732 closes odoo/odoo#59023 X-original-commit: f1ac4bb61d1bc02c4b69dc31a2869fbd15852514 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-02[FIX] mail: disable initial scroll position for chatterSébastien Theys
task-2350534 closes odoo/odoo#59018 X-original-commit: 4db7ecd836525357f408359e000a12880a5eab4a Related: odoo/enterprise#13779 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-29[FIX] mail: reintroduce auto scroll on receiving messageSébastien Theys
task-2336251 closes odoo/odoo#58867 X-original-commit: f732980b2e5e83bcf2fdc8d3ce756f256cacbd4f Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-29[REF] mail: remove unused nonOriginThreadsSébastien Theys
This field was only used to compute the `threads` field. X-original-commit: 8089b521aee89eb70ad0c951a1aaf76763c66098
2020-09-29[IMP] mail, website_livechat: bring back visitor banner in discussXavier Dubuc
task-2276589 closes odoo/odoo#58857 X-original-commit: 65dbe1c4760e2ffe104426f9aa41007a10dc32f0 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-29[FIX] mail: do not show new messages separator for own messagesXavier Dubuc
Also fix compute of local counter in some specific situations. task-2341740 closes odoo/odoo#58855 X-original-commit: 7d1878ff8a4757d1626d694b624f79e597ddd717 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-29[FIX] mail: prevent sync fold state for non-channelsSébastien Theys
task-2346650 closes odoo/odoo#58794 X-original-commit: f5b6e78e77eac27af3b3812ac3818a67acaa1c85 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-24[FIX] im_livechat, mail, website_livechat: open chat website visitorAlexandre Kühn
Also fix an issue with livechats not being considered in 'chat' filter of messaging menu. Task-Id 2282426 closes odoo/odoo#58466 X-original-commit: 631e52536964763bbfe857305f023e5e67084e95 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-24[FIX] mail: Mailbox is half loaded on mobileRomain Estievenart
Before this commit on mobile when you come to odoo from a notification url like: https://my_domain/web#action=mail.action_discuss&active_id=1&menu_id=93 a traceback occurs on mobile discuss wasn't loaded correctly and the content didn't appear. With this commit, it's open the related discuss thread. It's also ensure the return to the chat tab when you close a chat and the return to the channel tab when you close a channel conversation. We also ensure the loading of the inbox items when you navigating on the mobile discuss button. Steps to reproduce: 1. Open a chat from a mobile notification 2. A traceback occurs opw-2310319 closes odoo/odoo#58428 X-original-commit: 8ca5024bef246c93bbb7522d77aca4c4ba7a33b4 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-23[FIX] mail: use compute fields for identifying relationsXavier Dubuc
(in message seen indicators) task-2335647 closes odoo/odoo#58373 X-original-commit: 3d4ff42f4474a5761c9e0737297d973992a2fcc2 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-23[FIX] mail: compute display_name for partner and userDidier (did)
task-2322135 closes odoo/odoo#58371 X-original-commit: d9bdbde95c3694ecdaccd58b5475631137c22e93 Related: odoo/enterprise#13476 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Co-authored-by: Sébastien Theys <seb@odoo.com>
2020-09-23[FIX] mail: prevent unnecessary fold state RPCSébastien Theys
When the pending value is the same as the current server value, the pending value should be ignored and no RPC should be done. In particular this prevents a non-main tab from calling the RPC when receiving a bus notification that would lead to closing a chat window, which in turn used to call the close RPC again before this commit. This led to inconsistencies especially on the main tab, if the chat window was requested to be open again after the initial close, but before the "secondary" close, it would end up closing instead of opening. The current commit reduces the issue and prevents as many unnecessary RPC as there are tabs open, which is a good improvement. But it does not negate it completely. Indeed, when quickly closing then opening the same chat window, it might still happen for network reasons that the RPC or the corresponding bus notifications are received in the wrong order. This is less frequent both functionally (to click so fast) and technically (to have the network that slow) at the same time, so it is considering acceptable / out of scope. The opportunity is taken to clean up the code by removing unnecessary fields and making use of compute and flux specific RPC instead of `_updateAfter`. task-2273658 task-2329521 closes odoo/odoo#58367 X-original-commit: cbb1d855c7af5f78819db3cd476dbe0f985bc214 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-23[FIX] mail: avoid flicker when uploading multiple attachementDidier (did)
task-2282327 closes odoo/odoo#58354 X-original-commit: 413c6c406eac52048b9a0b80c7ee46efe5b061c4 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-23[FIX] mail: allow to open record thread in chat windowSébastien Theys
task-2171885 closes odoo/odoo#58318 X-original-commit: af6e68c2c5bd819402af0126c87f375e096c8d0d Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-23[FIX] mail: ignore `undefined` in JS fields create/writeSébastien Theys
Passing a field containing `undefined` should lead to the same result as not passing the field. Fields that relied on `undefined` as a value have been changed to use the newly introduced `clear` command, that resets a field to its default value (often that is equal to `undefined`). task-2336491 closes odoo/odoo#58308 X-original-commit: b18824485483564d2ab80f41914a3548aa528ae0 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-21[IMP] mail: reintroduce channel mentions, canned responses, commandsJulien Giannone
task-2280308 closes odoo/odoo#58166 X-original-commit: b63d0d2ee5f3bff24a5e1e1cd962d59bebef082d Related: odoo/enterprise#13392 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-21[FIX] mail: restore the "to followers" featureDidier (did)
Before this commit, the "to followers" message inside the chatter composer was missing. Fix also some padding issue. This also restore the form dialog when you try to send a message to a suggested recipient that doesn't have a partner (someone in CC email for eg). But now, suggested recipient without partner are unchecked by default and the form open when the user try to check them. If the user discard the form dialog, the suggested recipient isn't checked. This is better since only a partner will receive a notification. task-2280157 closes odoo/odoo#58160 X-original-commit: 67d151cc36871d87b92676357a31a70de5a92fce Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-18[FIX] mail: fix notification partners display in popoverXavier Dubuc
Handle notification creation in convertData correctly. task-2324260 closes odoo/odoo#57970 X-original-commit: 7305bcf4edcbaa31b86bdc7b4ece460f30515c27 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-17[FIX] mail: fix "New messages" separator and channel_seen behaviourXavier Dubuc
- channel_seen is now called even for own message and only when needed - channel_seen is now called with a message_id which transfer the decision of what is seen to the client which makes more sense task-2282235 task-2282248 closes odoo/odoo#57950 X-original-commit: 04edfa50ccea305050d017c4a1996e561bc7bd57 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-16[FIX] mail: send the correct args to the message_unsubscribe methodDidier (did)
Before this commit it was not possible to remove a channel from the followers. task-2324263 closes odoo/odoo#57812 X-original-commit: 9a065048bbdd09072084d03e67fd012766ddbe23 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-14[FIX] mail: no longer display unlinked attachments in chatterFrancois (fge)
Task-2337952 closes odoo/odoo#57627 X-original-commit: 55cb4a82ce2b59bc73ea05afa5971c96989b6159 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-14[FIX] mail: allow temporary attachment to be canceledXavier Dubuc
task-2324065 closes odoo/odoo#57618 X-original-commit: 9f774d4fb512017ab5f99981255afc8d2c35113c Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-11[FIX] im_livechat, mail, website_livechat: invite button in livechatsAlexandre Kühn
Task-2334724 closes odoo/odoo#57505 X-original-commit: 5316c91c27e48bfaa3ebf3fb97e35220fabc986e Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-07[FIX] mail: chatwindow scroll to the last message when postingDidier (did)
Before this commit, when a user posted a message from a chatwindow, the scroll did not move to the last message. task-2314409 closes odoo/odoo#57178 X-original-commit: 8e4f133890b08e7e9a909abbc97b89bb5409119a Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-04[FIX] mail, sms, snailmail: prevent message_fetch for hidden threadsXavier Dubuc
Automatically load messages from a thread cache only if the thread cache is used in at least one thread view. Ensure thread viewer don't keep thread view records alive when they are not displayed. This change is particularly important for performance, to avoid spamming RPC at init if many threads are opened in chat windows. task-2310623 closes odoo/odoo#57061 X-original-commit: dd6981c7812134e0588f80a157eaba45512cd68e Related: odoo/enterprise#12936 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-28[FIX] mail, *: fix opens and redirects, adapt messaging menu closeSébastien Theys
task-2244279 task-2262862 task-2274993 task-2277537 task-2282238 closes odoo/odoo#56745 X-original-commit: 109f202 Related: odoo/enterprise#12761 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-28[FIX] mail, *: rename thread viewer to thread viewSébastien Theys
The "viewer" should be the "parent" not the view itself. This distinction will become important in a future commit to allow viewers to not display the view in some situations. Rename done as a standalone commit to ease diff readability. Part of task-2310623 closes odoo/odoo#56737 X-original-commit: 1b811e6a972d72de02965adda67c5b039bee023f Related: odoo/enterprise#12756 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-27[FIX] mail: prevent "record created" from being twice in the chatterSébastien Theys
task-2280184 closes odoo/odoo#56691 X-original-commit: 1af2cc1b2190623739085de83870fb415cbdccf1 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-27[FIX] mail: 'Cannot read messagingMenu of undefined' tracebackAlexandre Kühn
Before this commit, on page reload, sometimes web client crashed with `Cannot read 'messagingMenu' of undefined`. This happens due to messaging components making use of `messaging` in `env` as if it was always set. In some rare cases, this is false, hence the crash. This happens on root components of messaging such as the messaging menu. Creation of `env.messaging` has to be async, in other to ensure all JS module that patches messaging are applied. The mounting of messaging root components depends on other parts of the web client like the SystrayMenu. So the proper fix is to guard `env.messaging` on these root components. Task-2238245 closes odoo/odoo#56682 X-original-commit: d1483ff3c83bb3146e80e5d65a27915c5b2a2bf9 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-26[IMP] mail, mail_bot: move notif request and OdooBot name into mailDidier (did)
task-2282334 closes odoo/odoo#56584 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-25[FIX] mail: reduce space in activityDidier (did)
The Wysiwyg editor put `<p><br></p>` even without a note on the activity. To reduce the size in the UI, We compute the note to replace these almost empty note by an actual empty value. task-2282324 closes odoo/odoo#56475 X-original-commit: bf441dbc66439137c3a19093a6b524545ae94cee Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-24[FIX] mail, im_livechat: make livechat work properlySébastien Theys
- fix traceback on receiving first livechat message due to bad computation of correspondent - fix missing [0] in return of country name_get in channel_info - fix visitor/correspondent computation to work when chatting with oneself - reintroduce livechat ordered by last message in discuss sidebar - improve mock server to make these fixes possible to test - introduce corresponding tests PR: #56243 task-2323670 closes odoo/odoo#56414 X-original-commit: f623bfd2c8819604c709bc723153c071dca6e3cc Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-24[FIX] mail: ignore broadcast notifications targeting another userSébastien Theys
This is typically not the case in production code, but it doesn't hurt to be safe. The main reason for the change however is that it causes issues in tests due to the easiest way to simulate notifications being to send them directly on the bus which is "listened to" no matter the target user. PR: #56243 Part of task-2323670 X-original-commit: 62e1e7fe39a7bed6ce70466a0aec645c7a0f299d
2020-08-24[FIX] mail, im_livechat: ignore notifications for unknown channelsSébastien Theys
Inserting channels and handling notifications for channels that have not been properly initialized through the `channel_info` leads to issues due to incomplete data that is not properly handled, such as bad correspondent, missing uuid, inconsistent name, etc. Moreover it doesn't make sense functionally to handle notifications such as typing status if the channel isn't going to be displayed. PR: #56243 Part of task-2323670 X-original-commit: 75070665060d64fe7b532aac4fc8e8410381b083