Before this commit, to mark a message as read in Inbox
of Discuss app, we had to click on "More" option and
then select "Mark as Read".
Considering this is a frequently used option in Inbox,
it'd best to have it easily accessible like "Reply".
This commit shows "Mark as Read" as a quick option of
message when in inbox. As to keep at most 3 quick options,
the "Add a reaction" option has been moved to the "More"
menu when in inbox.
Note that Emoji picker requires an anchor, and items in Dropdown
are components therefore they cannot have `t-ref`. To solve this
issue, there's an invisible `<span>` in the quick option list
that is used as anchor for the emoji picker when used from
the "More options".
Task-3412306
closesodoo/odoo#127570
X-original-commit: b9c8fe1759f03952a42c9bee117e718eab3fef08
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Before this commit, message actions were floating on top-right
corner only in chat windows. In mobile, most threads are shown
in a (fullscreen) chat windows. Some exceptions are mailboxes
and chatters in an Odoo view.
As a result, lots of horizontal space is wasted for this action,
so that messages take only half of the screen width.
This commit fixes the issue by using floating visual of message
action list when in chat window or in mobile. That way, when the
width of thread is small, then messages take most of the container
width thanks to actions being in floated layout.
Task-3411797
closesodoo/odoo#127569
X-original-commit: fb100f848388d6e50029a81080e051c77cc057c2
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Before this commit, only logged notes could be edited in chatter.
With this commit, messages sent with "Send message" are also
editable.
Task-3380465
closesodoo/odoo#125939
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Prior this commit:
In mail subtype, any users could have perform modification on it.
After this commit:
Now user have only access to read and only admin can do all the modifications.
Task-3245940
closesodoo/odoo#127539
X-original-commit: 1b99f9b6608793612dda72007a4ca2258373a97f
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Before this commit, the fixed margin between buttons wouldn't leave
enough room for all the buttons to fit in one row in the chat window.
This commit fixes this issue by using the flex space-between instead of
fixed margins.
closesodoo/odoo#127424
X-original-commit: c5a121729d5348ff81ef9bb8f58611c9234ef9f9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Follow-up of https://github.com/odoo/odoo/pull/120002
Commit above made a a structural change of code that
should not have changed the functional behaviour of
chatter.
In consideration of reducing query count footprint,
it replaced a `browse().exists()` by `search()`, as
`exists()` always perform a query whereas `search()`
may rely on cache and skip a query.
However, `search()` filters archived records, so this
change unintentionally removed the possibility to send
messages on archived chatter. Also the performance of
`search()` and `browse().exists()` are pretty much the
same, so the premise of changing it to `search()` seems
wrong.
This commit reverts this part so that this is the exact
same behaviour as before.
closesodoo/odoo#127518
X-original-commit: 43227ad2eaaeba3f6e3e6fae8b84728e0c33c59a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This reverts odoo#126869.
Motivation for debounce was to reduce the amount of RPCs, to
not put too much load on server.
However, this makes showing of mention slower than it should,
and the load on server is already adjusted based on duration
of ongoing `fetchSuggestion` RPC: if server can reply with mentions
immediately, then no need to debounce. If the RPC is slow, then
next `fetchSuggestion` waits for current RPC to finish before
making a new fetch.
This PR also fixes this small crash when using mentions:
```
TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at cleanTerm (format.js:244:1) (/mail/static/src/utils/format.js:244)
```
Steps to reproduce:
- type `@` then `backspace` then `@` then `backspace`, etc.
This happened because suggestion hook internal state had `term` being undefined when there is no term, but `undefined` is invalid for `cleanTerm`. `""` is a better default for no search term, and since this is a string this works with `cleanTerm`.
closesodoo/odoo#127399
Related: odoo/enterprise#43678
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
- The private addresses have been removed from the "res.partner" model.
- The employees' private address information has been moved to the "hr.employee" model, preserving the old records but emptying the private information fields.
- The applicant's private address information has been moved to the "hr.applicant" model, following the same approach.
- More generally, some efforts have been done to ensure we only create and use the same partner from the application form, to the employee creation and also the user creation.
- The salary configurator offer mechanism has been improved to provide stability (no more arguments in URL), traceability (track changes and responsibles) and reporting.
closesodoo/odoo#120586
Taskid: 3101400
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The commit [1] removed two async module and caused a reorganisation
on the module loading.
Since that commit, the patches could be applied in a different order
and be applied after a save of one these patches.
This commit fixes a case where we save the reference of a patched
function that we call it later with missing patches.
[1]: 96687f29496ab4cf16ae2ab1584ef1a6a3fb4a11
Part-of: odoo/odoo#121185
- Improve performances, as the ir.rule restricting private partners
visibility is also applied on res.users by inheritance, on each
prefetch.
- Solve the issue of partners set as followers on records (eg: application
form) and then made private, making them impossible to contact via the
chatter.
- Solve the multiple access issues when trying to access the bank
account, or the private address for non HR people like the accountants
forcing the usage of sudo in the business code.
TaskID: 3101400
* = im_livechat, test_discuss_full
According to stats from our production database, this query is 10 times
faster than the one generated by the ORM by using a `left join` rather
than `id in`.
closesodoo/odoo#125961
Related: odoo/enterprise#43635
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Purpose:
This commit adds Emoji_picker functionality to the web_editor,
allowing users to conveniently add emojis to their text and
improving the overall user experience.
Specifications:
Now we can insert emoji in web_editor using `/emoji`.
Task id: 3253958
closesodoo/odoo#125137
Related: odoo/enterprise#42772
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Since https://github.com/odoo/odoo/pull/126713, deleting a message
would crash as the `mail/message/update_content` route is called without
passing the `partner_ids` parameter.
This commit fixes the issue by making the parameter optional.
closesodoo/odoo#127284
X-original-commit: 34abd3dc1d159962a376b248134d0cd4977f3dcb
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, horizontal spacing in message between avatar
author and bubble was too big. This makes reading messages slightly
hard, because this small gap gives the impression that the message
and avatar are 2 distinct part of UI.
This commit fixes the issue by reducing the size of message sidebar,
so that avatar and bubble are much closer together.
Also the message avatar was too close to the border of chat windows.
This commit fixes the issue by slightly increasing the horizontal
padding of messages in chat window (`px-1` => `px-2`).
closesodoo/odoo#127341
X-original-commit: 226c6588a89bf21e8c0a47010bffb8c59cbb4e37
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when making an activity set at a specific date,
and then changing its deadline, the activity in chatter still displays
the old date instead of new date.
Steps to reproduce:
- schedule an activity in chatter for today
- edit activity and change deadline for tomorrow
=> Activity in chatter shows "Today" instead of "Tomorrow"
This happens because the compute of date delay in activity component
is made locally and relies on a field in activity model, which itself
is a reactive (because the activities are stored in discuss store,
which itself is reactive). This compute is made at setup and on change
of props. However, when the `deadline_date` in activity model changes
then the model is still the same, therefore it doesn't trigger the
`onWillUpdateProps`.
This would work if this part of template was fully relying on
`deadline_date`. It was the case for the icon, so the icon is working
well. But the label was computed locally, so OWL could not detect that
`state.delay` needs to be recomputed.
This commit fixes the issue by replacing `state.delay` to a getter
that reads on `activity.deadline_date`, so that this is reactive
to changes on `deadline_date`.
Also fixing a memory leak of a `setTimeout` that was not cleared on
unmounting `Activity` component.
closesodoo/odoo#127319
X-original-commit: d7e314dde8d7bb20ed83ba821cdad1009c87e4c8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when opening the related thread of a
message from inbox with "Open Link in New Tab", it was not
redirecting to the thread.
This happens because the url was wrongly using message id rather
than thread id. As a result, it redirects to either bad model or
a non-existing model.
This commit fixes the issue by correctly using `resId` instead of
`id`, which is the thread id of message. Also renaming `url` field
of message to `resUrl`, to clarify this is the link of thread and
not a specific link to message.
closesodoo/odoo#127342
X-original-commit: 8270138aba7e31f5db7853fbf00be6922347a8c0
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, message action list in chatter were always
at the very right of chatter. On small messages, the gap can
be quite big, so it's not easy to tell which message is
related to the action clicked.
This commit fixes the issue by putting message action list
in chatter close to message content, similarly to how this is done
in Discuss app.
closesodoo/odoo#127334
X-original-commit: 06aa1a89ac23fb5705e6c588ff2c91193922d4ec
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, a tracking value message was displayed on a
single line instead of several lines. The parts of the content
of message with tracking values changes were wrapping on multiple
line.
This happens because the content of message had `d-flex`, which
affects notably tracking values that have this DOM shape:
```xml
<div class="o-mail-Message-content d-flex">
<p>Stage changed</p>
<ul>
<li><span/><i/><span/></li>
</ul>
</div>
```
Because of `d-flex`, `p` and `ul` were next to each other
horizontally, and the `span` in `li` were wrapping to take
responsive layout of `d-flex` into account.
This commit fixes the issue by removing the `d-flex`. This is
undesirable, as the content is HTMl and it should follow the
intended design of the content. `p` and `ul` next to each other,
without specifying custom `display`, should default to 2 `d-block`
next to each other, so they must be on top of each other.
closesodoo/odoo#127320
X-original-commit: c7df8a5fe0c3f785066800e77eef5a46246308dc
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, dropdowns in chat window (chat window more menu,
message actions more menu) had no keyboard navigation support.
This happens because dropdown item navigation makes use of hotkey
service, and hotkey service intercepts keyboard in bubble phase on
window object. `ChatWindow` component had a `t-on-keydown.stop` on its
root node, which prevented the hotkey service to receive keyboard
navigation for the good working of dropdown keyboard navigation.
This commit removes the `.stop` modifier on this `t-on-keydown` root
node of `ChatWindow` template. `onKeydown` in dropdown inside chat
window have precedence over `onKeydown` on chat window: For example,
when dropdown is open, hotkey "Escape" closes the dropdown menu but
does not close the chat window.
closesodoo/odoo#127318
X-original-commit: 4b36b28bd9e426b115ffefbbc174fe2efa3dfbf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, avatars in activity menu and in message reaction
menu were rounded circle, instead of rounded square.
All avatars were rounded-circle before MILK redesign in 16.3.
Since MILK in 16.3, almost all of avatars should be shown in a rounded
square. These 2 occurrences were using the old design of avatars.
closesodoo/odoo#127285
X-original-commit: ea83eb15b354470cbc104b4e0325280d5e349657
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when navigable list is loading data of
suggestions, the showing of "loading..." had label and icon
next to each other without any gap.
This commit adds a small gap between icon and label, so it looks
nicer.
closesodoo/odoo#127304
X-original-commit: 0aaab95cd39c50d9320dbec0417773497ebc0fcc
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, fetching suggestions (e.g. channel selector
in discuss sidebar "Find or create a channel", or `@`-mentions)
were performing RPCs on each user input, resulting in wasted
network and server load.
This commit fixes the issue by debouncing the fetching of
suggestions to 0.5 sec.
closesodoo/odoo#126952
X-original-commit: 6770ac3
Related: odoo/enterprise#43502
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR improves several things linked to visitors in the discuss
app:
- Change window header to "Visitor #, country"
- Change operator's name to Online Chat name if defined
- Rename "Public user" to "Visitor #", add country instead of website
- Change name of the thread to "Visitor #, country" (left panel + header)
- Remove "Website" from visitor's name (small and big threads)
part of task-3332872
closesodoo/odoo#125931
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Some props like className were declared as optional in TagsList while
they are not used by the component. We remove them from the props
declaration.
Part-of: odoo/odoo#126350
While being logged in on mobile and having a chat window open in the
frontend, the buttons to close the chat window and to go to
the backend — both located on the top-left side of the screen — overlap,
making it impossible to close the chat window.
To solve this issue we've removed the chat window's `.fa-arrow-left`
and replaced it with the `.fa-close` icon on the right which is the
design we already have on desktop. Padding had been removed around
the close button on mobile and has been put back.
task-3120032
closesodoo/odoo#126889
X-original-commit: 870fcceab0c4142035d257b7b6fe6e7fcbf2a372
Related: odoo/enterprise#43485
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This happens because last `<p>` of message was always `inline-block`
to properly position "(edited)". However, this was breaking some
non-editable content that relies on `<p>` default displays (`block`).
This commit fixes the issue by only inlining the last `<p>` of
an edited message. Non-edited message keeps the default styling of
`<p>`.
Also slightly improve alignment of edited on empty body messages.
Related to Task-3374747
closesodoo/odoo#126988
X-original-commit: 92b359347fc3e390a75ef7a27a9fa758a21673dc
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
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 PR, the "unknown" im status was not properly
displayed. This commit ensures the question mark icon is displayed
when no im_status is available.
closesodoo/odoo#126958
Signed-off-by: Alexandre Kühn (aku) <aku@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>
This commit improves the tree/kanban rating view for livechat
channels:
- Open the channel in discuss if the member is a member of it.
Open the form view otherwise.
part of task-3332872
closesodoo/odoo#125902
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit:
The channel name used to overflow in the channel suggestion section.
After this commit:
The name will not overflow in the channnel suggestion section also
added limit on input character.
Task id: 3366608
closesodoo/odoo#126872
X-original-commit: 95c4b24a4fe8f2af1fce73e99684815d14a895be
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Bug
===
The many2one properties to res.users and res.partner have an image
with the avatar. But the size was applied only for the res.users
model (and it was implemented in /mail and not in /web).
Remove the `width: auto` because it's redundant with `aspect-ratio: 1`.
Task-3377098
closesodoo/odoo#126835
X-original-commit: e05caa80120bd5bc7ba0b078c3237daddae995ed
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Before this commit, search in emoji picker was case-sensitive
and had no scoring of items. For example:
- typing "ok" did not match with 🆗
- "ok" 1st suggestion was 😘 because of keyword "face blowing a kiss"
and this is one of the 1st emoji having characters "o" and "k" in
search terms.
After this commit, search is now fuzzy:
- typing "ok" shows 🆗
- "ok" 1st suggestions are 👌 & 🆗
Task-3175520
closesodoo/odoo#126801
X-original-commit: 4953172398719df829735f381f4e8939f17b1989
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, unpinning a thread from the discuss app
would keep its related chat window opened. This PR solves
this issue.
Steps to reproduce (non channels):
- Open a chat window (e.g. sales channel)
- Go to the discuss app
- Leave the sales channel
- Get back to the home menu
- Chat window is now the "New message chat window" as the
thread has been removed but the chat window was not closed.
If those steps are reproduced with a channel (e.g. direct messages),
the chat window is kept as is as the channel is not removed.
task-3389554
closesodoo/odoo#126751
X-original-commit: ef14f50d9ab7e2f38d65ac569f4108a89abbb69a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When a user click on the 'Follow' button in the chatterbox of the project
Task form view without adding any data, then traceback will appear.
Steps to reproduce(i.e Project):
- Install project module.
- Go to Project >> Tasks >> My task(you can also choose the all task menu) .
- In the list view of project.task model, click on the new button.
- In-form view of project.task model, Click on Follow Button in the chatterbox.
Error: traceback appears: "psycopg2.errors.UndefinedFunction: operator does
not exist: integer = boolean"
sentry-4243265676
closesodoo/odoo#126749
X-original-commit: eeaee0d57effb50d3a0edad1672e17bffea11d0a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, chat window actions were all placed in
the right part of header. It was showing the main action (call),
close action, and all other actions in dropdown menu from
the "..." (more) button.
This commit now replaces the "..." (more) button by clicking
on avatar/name of conversation. The "..." (more) button has been
replaced to "_" (minimize/fold) button, as clicking on header to
open/fold chat window can become hard due to avatar + name being
clickable to show most chat window actions.
This commit also adds the following actions in chat window:
- Open (Employee) Profile
- Rename (conversation)
Task-3336752
closesodoo/odoo#124592
Related: odoo/enterprise#42480
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR improve feedback messages:
- Visitor has left the conversation: as note
- Rating message: as note
- Rating message: Use same emojis as for customer
- Rating reason in same message as the emoji, without writing "reason"
- Feedback done in 1 rpc instead of 3
part of task-3332872
closesodoo/odoo#125925
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The previous commit introduced an optimization to reduce the number of
queries and fields fetched when we call `name_search`. But it works much
better when the dependencies of `display_name` contain field names used
in the calculation (on the same record/model).
Then, to improve the performance and the cache coherency, add `depends`
and `depends_context` depending on the custom `_compute_display_name`.
Add only the first level of dependencies (never traverse relational
field) because only these have a positive impact on the previous
optimization and the cost is very low (see `modified`).
About `depends_context`, we don't include `lang` because (when `_` is
used by example) it is unlikely to get the same display_name in the same
request with two different lang.
closesodoo/odoo#122085
Related: odoo/documentation#4639
Related: odoo/enterprise#42599
Related: odoo/upgrade#4780
Signed-off-by: Raphael Collet <rco@odoo.com>
Rationale
=========
Since v8, the `display_name` field is present on all models. By default,
`display_name` uses `name_get` which has pretty much the same purpose
(return record name used by the web client). Gradually, many (backend)
developers (and the ORM: https://github.com/odoo/odoo/commit/6da1c3ac4c036eac289597602976538e243cb939)
started using `display_name` (more convenient than
`record.name_get()[0][1]`) but it still had the `name_get` override.
It becomes more complex than necessary and poeple start to misunderstand
the two (and sometimes override both, leading to inconstiencies between
`display_name`/`name_get`).
To simplify the ORM and the API, we decided to keep only one of them,
the `display_name` field:
- It is much more convenient from a backend point of view
(`record.name_get()[0][1]` vs `record.display_name`)
- It is cached during the same transaction (and invalidated if
its dependencies change)
- It can be overridden like any other compute field (override
`_compute_display_name` with any extra dependencies)
- `name_get` is replaced by `read(['display_name'])`
(API perceptive), which can actually be more efficient
(if `display_name`'s depends are correct, the ORM will only fetch the
fields it needs instead of every prefetchable field)
Changes
=======
- Deprecates `name_get` for the v17 and based the method on
`display_name` (the opposite of before)
- Converts all usage of `name_get`
- Overrides of `name_get` are now overrides of `_compute_display_name`
- For `res.partner`, rename the field store `display_name` into
`complete_name` because `display_name` context-dependent and it makes
no sense to have a compute store that is context-dependent.
- Previously, it was possible to return multiple names for the same
record with `name_get`, but it was tricky and most of the usage of
this `name_get` didn't take this into account. The only example of
this is the `name_get` of `product.product`
(now use `", ".join(<names>)`).
Part-of: odoo/odoo#122085
Before this commit, when opening self-chat and trying to add users,
self id was duplicated with the chat partner id, leading to a crash.
This commit fixes the issue by removing duplicates in inviting users,
so that there's no longer a crash when inviting users in self-chat.
task-3381895
closesodoo/odoo#126605
X-original-commit: d101a82b97989d5c60c1b6dfbc5fa2143680bd3c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR improves the livechat session history list view:
- Clicking on a session opens the channel in discuss if the
user is a member of it. Opens the form view otherwise.
- Display duration of the session (last message datetime - first
message datetime)
- Display country of the visitor
part of task-3332872
closesodoo/odoo#125899
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>
This PR make add a last used date to the canned responses
in order to know whether they are still usefull or not.
part of task-3332872
closesodoo/odoo#125909
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When parsing an email containing an xml attachment, the `email` python
module will decode the base64 attachment using the charset or ascii if
the charset is missing.
In some cases, the payload is in UTF-8 but the charset is omitted. This
results in replacement characters for the non ASCII characters.
The solution is to force the charset to UTF-8, since it is a superset of
ASCII that should not be a problem.
NB1: Omitting the charset for text/xml is not recommended. See the RFC
(section 6.4): https://www.ietf.org/rfc/rfc2376.txt
opw-3144519
closesodoo/odoo#126474
X-original-commit: e3a5b46c7b4f5030e165a6d943ec2275aea5d583
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
This PR fixes an alignment issue for the attachments in the
chat windows. Indeed, those attachments were always displayed
to the left while it should be to the right in case it was
uploaded by the current user.
closesodoo/odoo#126355
Signed-off-by: Didier Debondt (did) <did@odoo.com>