Before this PR, I guest searching in discuss would get an access error.
This is because the search is searching in the attachments that the guest can't
access.
task-3637314
closesodoo/odoo#146110
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR online and offline cache getter where called when not needed.
This PR move the code inside the onWillRender hook to cache the results and
avoid useless computation of getters.
task-3572093
closesodoo/odoo#141750
X-original-commit: 57aa00893cc47456d5eb39f429c83c4069ab0d7e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR cache control header for avatar was set to no-cache which is not
the right value.
This PR mark the avatar routes response as immutable when a unique string is
present. We also use the partner write_date as unique string when possible.
task-3551636
closesodoo/odoo#141326
X-original-commit: 3de4f1f1225229cbdb0512df5790ce491f04ea7e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR, newly created direct message would be added at the bottom of the
list instead of the top.
This PR fix the issues by sorting the direct messages when creating a new direct
message channel.
Task-3566728
closesodoo/odoo#139960
X-original-commit: 60cf880102615a524f2fa89c71be7f1b08d931d1
Signed-off-by: Didier Debondt (did) <did@odoo.com>
To reproduce:
* Populate mail.message as medium or more
* Open odoo and click the messaging menu
* The messaging menu take an unreasonable amount of time to open.
This PR cache the threads getter to avoid unnecessary computations
task-3551625
closesodoo/odoo#139519
X-original-commit: aa92a630d5146b7a4ee5eb5d09bb6db04c1ba146
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, it was not possible to edit a message that has an empty body.
Task-3387170
closesodoo/odoo#137996
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Before this PR, archived partner where displayed in the recipient list, but they
will never get notified.
This PR exclude archived partner from the recipient list.
task-3535433
closesodoo/odoo#137759
X-original-commit: a2474635c31d47e480f7a871aa869667f0a90dc5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Before this PR the showFavorite status was not properly updated after clicking
on "back".
This cause the categories to use the favorite route when scrolling instead of
the category route.
Task-3504566
closesodoo/odoo#136932
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Before this PR, the current user was not considered has a follower, regarding
the mention suggestions.
This lead him to be lower than other entries.
This PR fix the issue by adding him back to the follower list.
Task-3531111
closesodoo/odoo#137583
X-original-commit: 50a785fedc5b5c7fd826548e52385bdf458c97a2
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
This PR introduce multiple usage of the escape key:
- Channel selector can now be closed using the escape key
- Using the escape key will focus the composer automatically
Task-3456518
closesodoo/odoo#135031
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, channel update were not sent via bus notifications.
Part of task-2821415
closesodoo/odoo#136623
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In log note case, followers are not going to be notified of the message.
Therefore the recipients input should not be visible.
task-3504225
closesodoo/odoo#136661
X-original-commit: c60449a2efde457e8370928681f011c103ea1d60
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
To reproduce this bug:
- Open a record with a chatter
- Open a composer (send message or log note)
- Change record using the pager
- Now, you cannot mention anyone
This is because the chatter component is reused and the `useComponent` hook isn't
refreshed with the new data.
This PR fix the issue by forcing a re-render of the composer when the `threadId`
changes. This refresh the `useComponent` hook used inside the `useSuggestion`
hook.
task-3502720
closesodoo/odoo#135331
X-original-commit: 28dd108294606499799e1fd2a7b24de23730d098
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In DM chat, the im status turns into typing icon so it was not
a problem. In group chat and channel, however, there was no way
to see typing members in chat window.
This commit adds explicit small text above composer in chat window
to list typing members of conversation.
Task-3474778
closesodoo/odoo#133757
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, it was not possible to scroll a chat window using page down/page
up, home or end keys.
This is because the thread component that is scrollable cannot became an activeElement.
This PR fix this by adding a tabindex="-1" on the scrollable element.
Task-3468978
closesodoo/odoo#134657
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Before this commit, when a message had many link previews,
deleting all of them required to delete one by one.
This commit improves this aspect by showing a "Delete All"
button in the dialog to delete all link previews at once.
task-3488054
closesodoo/odoo#134301
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR the link preview formatter was creating an unnecessary complex
object in the message key.
This PR simplify the payload by using a message_id key and remove the
unnecessary object.
closesodoo/odoo#134283
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, recipient list in chatter when using composer
in "Send message" mode where listing emails of all followers, instead
of only subscribers of "Send message" (= `mail.mt_comment`).
This commit solves this issue by loading and showing followers
that are recipients in this list. Because this feature and follower
list lazy-load some data, they need to manage they own list for
the "load-more" aspect. That's why the diff shows some duplicated
code as with `followers` field of JS thread model.
closesodoo/odoo#134225
X-original-commit: ba43502b22f8f00e7a2318b341302b809e7129dc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, message actions were all defined in template
of `Message` component. It's good when there are few actions and
the ordering of actions is always the same, but there are now
many actions and we want to order these actions depending on context.
This commit fixes the issue by introducing a special registry to add
message actions. This registry is quite similar to thread actions:
each item define conditions to be shown, behaviour on click, and
their sequence which can depend on the context where the message is
being viewed.
In addition to this message action registry, this commit also
reorder message actions in inbox as follow:
1. Quick actions:
- Add a Reaction
- Mark as To do
- Mark as Read
2. More menu:
- View reactions
- Reply
- Unfollow
- Edit
- Delete
Task-3458086
closesodoo/odoo#131426
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, a crash occured when a link preview was recieved from the bus.
This is because the link preview was pushed twice on the `message.linkPreviews`
array.
task-3491629
closesodoo/odoo#134135
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, RPC in the search GIFs form could resolve in the wrong order and display outdated result.
This PR introduce the use of useSequential hook witch ensure that irrelevant RPC
are canceled.
closesodoo/odoo#133125
X-original-commit: 39fe84706e02ff7828d5098c9ec56aff274cba64
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, if a user copy/past an already encoded url in the composer, the
linkify function would reencode already encoded character.
`%5B%5D` (witch mean `[]`) would become `%255B%255D` because `%` whould be encoded
`%25`.
We start by decoding the url, just in case it's already encoded.
closesodoo/odoo#133010
X-original-commit: 453c91d9c5b0353b5f362ecad487ccfd547856c6
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Before this PR, jumping on a message that is not displayed in it's originThread
would not work.
To reproduce:
* star a message that is a reply.
* open the starred menu.
* Try to jump on the replied message.
This PR fix the issue by not allowing the jump.
closesodoo/odoo#132924
X-original-commit: 914f899f119e4b5f6271613b4af653211a32f915
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, scrollbar in livechat session history was horizontal because the
flex-flow was set to column.
This PR remove the flex-flow to fix the issue.
task-3383919
closesodoo/odoo#131611
X-original-commit: ac3275706bbc3fcc1bffea731973de850db74892
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
This PR cleanup service typing:
* Introduce `addons/mail/tooling/type/services.d.ts` to automatically type
services imported by `useService` hook.
* Correctly type service constructor, setup and start functions.
* Remove now useless `@type`.
* Removing `Object.assign` for services variables.
* Type OdooEnv.services to services.
closesodoo/odoo#131192
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR, RPC in the channel invitation form could resolve in the wrong
order and display outdated result.
This PR introduce the use of `useSequential` hook witch ensure that irrelevant
RPC are canceled.
closesodoo/odoo#131011
X-original-commit: 7d628b6a2785a4ac2a1081413e8a54c7ad695cb5
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Before this PR, RPC made by input inside the discuss sidebar could
resolve in the wrong order, witch display outdated results.
This PR ensure that only the most recent RPC is sent to the server,
cancelling irrelevant RPC.
Note: This PR also remove the support for Promise inside the
NavigableList component since it's not compatible with useSequential.
closesodoo/odoo#130767
X-original-commit: ba2d029d876f9acd7c869cc3d345cc4ed7cab00a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, the `nextMentionRpcFunction` was always undefined and therefor
never used. This could lead to some RPC being lost if the previous one was too
slow.
This PR fix the issue by directly using the `rpcFunction` that is already assigned.
closesodoo/odoo#130292
X-original-commit: fff3323cb82fb51dbbe8ac6790479530bbc51ba9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, suggested recipients without partner where not
checked and needed to be manually created. This is prone to mistakes
when sending an email to the suggested recipient.
This PR checks all the suggested recipients by default and create
the missing partners when a message is posted, and when full composer
is open. That way, there's far less risk to not send the email to
suggested recipient, and instead the user should manually uncheck
to not send the email.
closesodoo/odoo#128647
X-original-commit: 258b2420676fb1a0d7e834ab79f6bf1ec0f73254
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR suggested recipients were not correctly moved to the full
composer because the partner id is stored on the persona.
closesodoo/odoo#128291
X-original-commit: 38902e19389d2d559bf5866bfa96f638ca619c34
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit adds a GIF picker in discuss
app. GIF feature makes use of Tenor GIF API [1].
To enable GIF picker in discuss, you must provide
a Tenor GIF API key in the General Settings.
Then the GIF picker is visible in all channels
(chat window and discuss app), next to the emoji picker
button.
[1] https://tenor.com/gifapi/documentation
task-2365705
closesodoo/odoo#116060
Related: odoo/enterprise#41959
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Brieuc-brd <brd@odoo.com>
Before this commit, when editing a message, it was not possible
to add new mentions.
This commit adds the support to add new mentions when editing the
message.
Note that mentions added from editing message won't notify them:
it's only at creation of message that mentioned users are notified.
task-3329714
closesodoo/odoo#126888
X-original-commit: 1fe935d273142064784b9ecff2fff1c34e91064f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, long text in the activity description could create a horizontal scrollbar in the chatter.
Task-2721466
closesodoo/odoo#126607
X-original-commit: 0d087cd335bff3dcc04d54889f87f7b143e42b67
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Before this PR, the mouse event click was automatically passed has behavior to
the jumpToPresent function. This cause a TypeError.
This PR use an arrow function in the template to avoid passing the event.
closesodoo/odoo#126073
X-original-commit: bfc6be4b9129e8fa103efd6de57eb1cc9903b780
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, when you reply to a message or edit a message, the action would
be cancelled when you click somewhere else than in the composer or emoji picker.
This PR remove this behavior.
closesodoo/odoo#120753
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Before this PR, using the message component wihtout a thread could crash because
props.thread could be undefined (as thread is an optional props).
This PR just add the guard.
closesodoo/odoo#120233
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Before this PR, link previews where not updated when a user was editing a
message.
This clear the current link previews and reprocess the updated message.
closesodoo/odoo#119917
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR complete the type definition for the props of the composer and replace
the custom Object by Ref type in the relevant place.
closesodoo/odoo#119593
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This PR hide the message body when the link preview is an image and the message
only contains the link to the image.
closesodoo/odoo#117772
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, a link preview image would overflow out of the chat window. This
because the max-width on the image is bigger than the space dedicated to the
image inside the chat window.
This PR set the max-width to 100% inside a chat window, so the image cover the
space nicely.
closesodoo/odoo#119019
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
"Order by" makes the query really slow.
On a database with 1000000 partner and 10000 user, this query goes from 5.5s to
600ms. Once cached by Pgsql it goes down below 100ms.
task-2982401
closesodoo/odoo#118198
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Before this PR it was not possible to disable the link preview by setting
`mail.link_preview_throttle` to 0. This feature was lost in the refactoring.
This PR reintroduce this feature.
closesodoo/odoo#117101
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR add a populate command for models `mail.channel`, `mail.channel.member`
and `mail.message`.
It will only create channel of type `channel` and `group`.
I used this bash function to quickly delete/create a database and populate it.
```bash
# Quickly drop the current db (it use the git branch name as database name) and
# create a new one that will be populated.
# usage: odoo-populate model_name size
odoo-populate() {
dropdb $(git branch --show-current)
odoo -i mail --stop-after-init
./odoo-bin populate --models $1 --size $2 -d $(git branch --show-current) --addons-path=~/projets/pro/odoo/addons,~/projets/pro/enterprise --c ~/projets/pro/.odoorc
}
```
closesodoo/odoo#115827
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
`PartnerRoot` is a confusing name for what is in fact what everyone call `odoobot`
closesodoo/odoo#116823
Signed-off-by: Debondt Didier (did) <did@odoo.com>
This PR fix a traceback that occur when pressing spacebar while the confirm
dialog for deleting a link preview is open.
task-3196494
closesodoo/odoo#113274
X-original-commit: d46a5171378497992bd65634f1aded53db27e9ef
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Some of our current bus notification only insert data in the models system. We
can now simplify the way we handle them by using a generic `mail.record/insert`
handler.
closesodoo/odoo#102863
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
If website is installed, the login page of Odoo has opengraph meta that will be
used to create link preview on mention and channel link.
This PR add a xpath condition to always ignore mention and channel link in the
message body.
Part of task-3000274
closesodoo/odoo#101678
X-original-commit: eb032a5c36af6402b79ae768ce29b3d84eacf3b7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Debondt Didier (did) <did@odoo.com>
The notification_alert component can now be registered as a view_widgets directly
closesodoo/odoo#100898
X-original-commit: 4f91758d1aefb6e459ccf02220bf4cf27f3a2ff2
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Fields param is actually not a kwargs. This cause a stack trace when opening a chat window (other than a chat with yourself) from a Kanban user avatar icon.
closesodoo/odoo#100315
X-original-commit: 95d3f4b0ea4dd5f1f9403b6e5ba97e1e2a510f65
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since we are not using `postMessage` in `updateMessage`, setting
isPostingMessage is not useful.
closesodoo/odoo#99744
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This PR fix a traceback that occure when the message body is empty (eg: only
uploading an attachment).
closesodoo/odoo#99625
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>