summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js
AgeCommit message (Collapse)Author
2019-04-17[FIX] mail: Don't display message if only subtypeLucas Lefèvre
Currently, if a message does not have any tracking value, any attachment and no body BUT has a subtype with a description, the message is not considered as empty. The message subtype should not influence its "emptyness".
2019-04-15[IMP] mail: follower name in confirmation dialog on unfollowKaushalya Mandaliya
Also fixing test so that it uses an existing follower. Task-ID 1919551 closes odoo/odoo#31139 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-04-15[IMP] mail: improve document chat windowPrakash Prajapati
1. In the systray messaging menu, when hovering on a notification linked to a document chat, it now shows an "expand" icon. Clicking on icon opens the corresponding form view with the chatter. 2. Messages in a document chat window no longer show linked document in their header, as this is redundant with title of chat window. 3. Font size of words "on" and "from" in header of message in chat windows have been reduced in order to closely match font size of document link. Task-ID 1929169 closes odoo/odoo#30957 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-04-10[MERGE] forward port branch saas-12.2 up to 2694174b410Christophe Simonis
2019-04-09[MERGE] forward port branch saas-12.1 up to af313858b4bChristophe Simonis
2019-04-09[MERGE] forward port branch 12.0 up to c1c322dd401Christophe Simonis
2019-04-05[MERGE] forward port branch saas-12.2 up to f2be461f090Christophe Simonis
2019-04-05[FIX] mail: reload the record when uploading attachments if post_refresh is ↵Nans Lefebvre
set to always When post_refresh is set to 'always', the displayed record is entirely reloaded each time a message is posted in the chatter. However no such thing exists for when attachments are uploaded. This is of use e.g. when in the view there are fields that have attributes that depend on computed fields, themselves dependent on the record's attachments. One such case is the OCR. opw 1950403
2019-04-05[MERGE] forward port branch saas-12.1 up to f2d0995362cChristophe Simonis
2019-04-04[FIX] mail: fixes document viewer's url previewThanh Dodeur
This commit fixes the document viewer: the document viewer was altering the `type` key of attachment objects, this issue was causing matching errors in some cases. With this commit, the document viewer widget uses its own key `attachment.fileType` to store the information that used to override `attachment.type` closes odoo/odoo#32414 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-03-29[MERGE] forward port branch saas-12.1 up to c0cf4049b2aChristophe Simonis
2019-03-28[FIX] mail: fixes the download urlThanh Dodeur
Following the changes to the document viewer to make it more flexible for use in documents (89f20d2c297d99d4eb0ded8be78fbf86b8ec45d3), the download route wasn't changed accordingly. This commit fixes this issue so the download route is based on the model of the viewer. closes odoo/odoo#32207 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-03-14[MERGE] forward port branch 12.0 up to a26496b6e79Christophe Simonis
2019-03-14[MERGE] forward port branch saas-11.3 up to f5ab04ce509Christophe Simonis
2019-03-14[MERGE] forward port branch saas-12.1 up to ff1bca32f3aChristophe Simonis
2019-03-13[MERGE] forward port branch 11.0 up to c23d1186e7bChristophe Simonis
2019-03-11[MERGE] forward port branch saas-12.1 up to 2b3296bbf8bChristophe Simonis
2019-03-08[MERGE] forward port branch 12.0 up to c023d0784f2Christophe Simonis
2019-02-28[MERGE] forward port branch saas-12.1 up to f9d3b5b7dfeChristophe Simonis
2019-02-22[MERGE] forward port branch saas-12.1 up to 0f4abc5c228Christophe Simonis
2019-02-21[MERGE] forward port branch 12.0 up to 84143a34b31Christophe Simonis
2019-02-21[FIX] mail: keep input focus on emoji selectionAlexandre Kühn
Before this commit, when adding an emoji from the emoji menu next to the composer, the focus was not automatically set on the input. The input was correctly focused during the event handler of the clicked emoji, but the browser default behaviour applied right after was focusing out the input. Task-ID 1943770 closes odoo/odoo#31325
2019-02-19[FIX] mail: no traceback on receiving seen notificationAlexandre Kühn
Before this commit, when we post a message and someone has received it, there could be a traceback. Steps to reproduce: 1. Two users are logged in. 2. On one user: - open any app except Discuss - From systray messaging menu, click on "New messages" - Open Discuss - Post a message in a direct chat with other User. > traceback `Cannot read property 'getID' of null` closes odoo/odoo#31228
2019-03-27[IMP] mail: add a different layout for inactive followersJulien Giannone
When displaying the followers of a document, followers who are set as inactive will be displayed in a different layout than the active ones. The purpose is to mark a clear difference between active and inactive followers. Task #1957849 closes odoo/odoo#32084 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-04-01[MERGE] forward port branch saas-12.2 up to 18c735361a6Christophe Simonis
2019-03-28[IMP] mail: add show more button on partner suggestion.XavierDo
When sending a message from chatter, a list of suggested partners appears on the top of the text area. With the previous commit, cc will be added to this list. This commit adds a show more/show less button in case there is more than 3 suggested recipients to display. Task: 1925001
2019-03-22[FIX] *: pass context in kwargs in rpc callsRaphael Collet
2019-03-25[MERGE] forward port branch saas-12.2 up to 230ad8c381eChristophe Simonis
closes odoo/odoo#32088 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-13[MERGE] forward port branch saas-12.2 up to c9f832d9f03Christophe Simonis
closes odoo/odoo#31790 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-06[REF] mail: stop using jQuery animateAaron Bohy
Problem is that jQuery animate uses jQuery deferreds, so it may happen in tests that we fold a thread window, and we have to wait for 2 (?) nextTick to see that the window is actually folded. We use a css transition instead, which produces the exact same result.
2019-03-06[REF] mail: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-02-19[IMP] mail : autofocus items in autocomplete inputsmgh-odoo
With this commit, when using autocomplete inputs in Discuss or chat windows, the 1st item is automatically auto-focused. Example of autocomplete inputs: - Discuss: "Add or join a channel" in sidebar - Chat window: when clicking on "New Message" from systray messaging menu. As a result, we can use keyboard keys to navigate and select the desired item. Task-ID 1894447 closes odoo/odoo#30207
2019-03-12[FIX] mail: translate global variableMartin Trigaux
As the message was set globally in the file, a _lt was needed for a lazy translation Fixes odoo/odoo#26288 closes odoo/odoo#31761 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-02-13[IMP] mail: allow tracking on groups protected fieldsLucas Lefèvre
Purpose ======= Currently fields with a `groups` attribute can't be tracked. Otherwise changes would be visible by all in the chatter, including users which normally don't have the access rights because they are not members of `groups`. Specification ============= Filter tracking field values according to the `groups` attributes. Users without the access rights should not see them. If a message is only composed of tracking values and the user doesn't have the rights to see them, an empty message should not be displayed.
2019-02-14[FIX] mail: enable seen feature only on direct chatsAlexandre Kühn
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a There were performance issue with the seen feature in multi- user channnels, therefore it has been disabled for them. As a result, only direct chats have this feature.
2019-02-12[FIX] mail: throttle batched `channel_fetched` RPCsAlexandre Kühn
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a The commit above added the seen icon on messages in a channel. However, since this feature, there was a performance issue when opening the systray messaging menu with several pinned channels: lots of RPCs are made, almost 1 for each preview in the messaging menu. The RPCs comes from the reception of the last message in the channel, to let the current user notify that he has received the messages in the channel. Those RPCs were made for each channel, thus the more pinned channels the more RPCs were made when opening the messaging menu. This commit fixes the issue by throttling and batching the RPCs. To do so, instead of letting the channel model handle the RPC `channel_fetched`, the mail service now handles it. This has the advantage to throttle the RPC globally and to batch the requests to notify that messages have been received on channels. closes odoo/odoo#31026
2019-02-11[MERGE] forward port branch 12.0 up to 6e8dff1952eChristophe Simonis
2019-02-11[MERGE] forward port branch saas-12.1 up to 93d736e905eChristophe Simonis
2019-02-19[FIX] mail: chatter attachments without threadThanh Dodeur
This fix prevents the chatter and attachment box from assuming that there is a mail_thread on the record; Reason: if a chatter is set on a record that doesn't inherit mail_thread, the attachment box will generate errors. closes odoo/odoo#31206
2019-02-08[FIX] mail: translate activity nameMartin Trigaux
This commit fixes two untranslated terms in the activity view. From the cohort view, when clicking on a cell to see details, the title was not translated (missing _t call). The content was not translated either as the language was not present in the context. 36d45175b087 was a first step to fix it but while self.record contained data, self.record.getContext() returns an empty dictionnary (no context is set in the cohort view). When computing the context, check that it is not empty, otherwise, fallback on the session context. opw-1936855 closes odoo/odoo#30942
2019-02-07[IMP] mail: correctly patch mail status manager timersXavierDo
We want to avoid that a `setTimeout` started in one test has an impact on other tests. This is especially true with the status update loop. Since mail_service is used in multiple tests, the safest solution is to patch timeouts everytime we make a call to getMailServices. There is no need for an unpatch, the patch become the default behaviour until the page is refresh at the end of tests. It is possible to manually add the patch after calling `getMailServices` ``` this.services = mailTestUtils.getMailServices(this); this.timeoutMock = mailTestUtils.patchMailTimeouts(); ``` This can be usefull if we want to get the timeoutMock to simulate time changes. Task: 1856205
2019-02-07[IMP] mail, web: Add indication abouts it's own status in user_menu.XavierDo
Task: 1856205
2019-02-07[IMP] mail: add a Read More on out of office messageXavierDo
Task: 1856205
2019-02-07[IMP] mail, hr_holidays: use leaves to compute im_statusXavierDo
When on leave, the im_status can be either leave_online or leave_offline. This will allow to display a specific icon and a default message when the user is not at the office. The leave can have an out of office message. This message will be displayed in the chat window instead of the user ooo message, and the end date of the leave will be displayed too. Technical details. Right now the im_status access leaves directly to know if a user is on leave or not. An index has been added to optimise this request (thanks to rco). A solution to optimise this would be to compute part of the information in a cron. Task: 1856205
2019-02-07[MERGE] forward port branch 12.0 up to a46138cb019Christophe Simonis
2019-02-07[IMP] mail: add ooo status in chats windows.XavierDo
In a chat window with a single usert (dm_chat) the ooo status of the other user is displayed on the top when set. Task: 1856205
2019-02-07[IMP] bus, mail, mail_bot: add im_status serviceXavierDo
This commit is a refactoring of im_status management. This commit also add im_status in two places, near the author in a mail thread and on each suggestion when using mentions. A service to manage im_status will have multiple benefits here: -centralise information, avoid to call the server multiple time for the same im_status -update all im_status at once and keep consistency in display. With this commit, the im_status updates are now done by rpc call. Updates where previously made with the bus but this has some drawback, since the bus will only give the information 50 seconds after the beginning of the request, in the worst case, we van wait 2*50 seconds to get an update. More than that, the im_status where only updates for pinned dm_chat. Dm chat are synchronized cross tabs, making the use of the bus possible for this purpose. Since we will need to display im_status not linked to dm_chat, the list to update will be different from tab to tab making the use of bus difficult for this purpose. Technical notes: -im_search has been moved from bus to mail addons since it concerns mail.channel -Update of an im_status should be reflected everywhere in the page. Since im_status is a rendered template used in multiple widget, we should add the correct logic to all concerened widget. The current solution is simple: use a jquery selector to find every place where im_status is rendered. -we add a new im_status: im_partner. This will indicate that that the partner has no user linked to him, making it possible to avoid to ask for status updates for this partner. -The update will only be done when the tab is focused. (and will be done asap once the tab get focus back)
2019-02-05[FIX] mail: activity model js: pass context to get activity dataLucas Perais (lpe)
Go on the crm activity view Have your user operate in another language than en_US Bafore this commit, the activity types were not translated This was because the context was not passed to the function After this commit, the terms are translated OPW 1924232 closes odoo/odoo#30837
2019-02-05[FIX] mail: mention special char=>link partnerNicolas Lempereur
This is a regression from: 10f0766b3. In it the visual side was solved, but unexpectedly the functional side still worked on unescaped content. Thus visually a @partnèr could be seen as a link, but it was no anymore added as follower. Without change, modified test fails with: mentioned partners are sent to server (expected: [1], result: []) note: change is partial backport of 12.2 e2f20ffa9 opw-1931247 closes #30846
2019-02-04[FIX] bus, mail, web: missing super() call in destroy overridesXavier Morel
closes odoo/odoo#30792