* = hr, im_livechat
The real service works just as well, gives more guarantee on what is
actually tested, and requires less lines of code.
closesodoo/odoo#132744
Related: odoo/enterprise#46108
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
* = account, calendar, im_livechat, mrp, project_todo, sms, snailmail,
test_mail, web, website_livechat
`contains` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.
closesodoo/odoo#130451
Related: odoo/enterprise#44999
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
`QUnit` tests require at least one `assert`. This change allows to write
tests that only contain `waitUntil` without extra `assert` in the test.
`waitUntil` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.
Currently existing tests that contain `waitUntil` have been adapted
accordingly. More and more tests should make use of it in the future.
Part-of: odoo/odoo#130451
Before this commit, when chatter data were fetched, it shows
spinner icon on attachments immediately until data are fetched.
This RPC is quite fast, so it's annoying to see spinner and then
no spinner whenever chatter is reloaded. This is even more
bothersome when most chatters have no attachments and some followers,
which gives the illusion loading affects followers rather than
attachments, as the spinner takes place of attachment counter that
is empty when no attachment.
This commit fixes the issue by having a 1 second delay for showing
the loading icon next to attachment. This prevents most flickers
when RPC is fast, while keeping it relevant when it's slow so it's
clear data are still loading.
Task-3356922
closesodoo/odoo#132463
X-original-commit: 96b00d25becdf2253975d1b427c30ee287cda98f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, closing a hidden chat window may crash.
This happens because closing a chat window was always treated as the
closing of a visible chat window, which should make the 1st hidden
chat window visible, if any. This code should not be called when
closing a hidden chat window, otherwise unexpected behaviour are
to be expected, e.g. closing 2nd hidden chat window swaps last visible
with 1st hidden chat window, or even a crash.
This commit makes sure auto-swapping of 1st hidden chat window only
occurs when closing a visible chat window.
opw-3460466
closesodoo/odoo#132458
X-original-commit: b49364b687757385a2a7356d17dc428edafd2767
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when mouse hovering on relative time of the
message, it showed the datetime without the seconds.
Not showing the seconds can make it hard to determine chronological
order of 2 messages in different conversations.
This commit fixes the issue by showing the seconds in datetime format
of message when mouse hovering on relative datetime part.
opw-3423016
closesodoo/odoo#132376
X-original-commit: b0019f5b92b9cebab9f1162631cbf00be5101b6f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: im_livechat.
Before this commit, suggestions were not showing anymore after
search/fetch returned no results. This commit fixes the issue
by resetting the search state when nothing is found.
task-3459933/3455060
closesodoo/odoo#132264
X-original-commit: 13b3f36a0d71bb55e2ca56fd207c7dfaba23aa86
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, messaging menu items of type chat show the
author name in body part. This is redundant with name of
conversation that is usually the name of the correspondent.
This commit does not show the name of the author in notification
item body when it's the same as correspondent of conversation.
closesodoo/odoo#132210
X-original-commit: 4b146aa70c721162b3741486246936af74f77f36
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit adds some discuss-related options in the command
palette.
- hotkeys to add channel (C) & chat (D), and start a meeting (M);
- namespaces `@` or `#` show mentionned and recent conversations
in Discuss app when search is empty;
Items show optional badge with needaction counter.
Mentions/Recent categories are only visible when there are no
search term. Indeed, `@term` searches for users while `#channel`
searches for channels, so these categories are meant to quickly
jump to recent and important conversations. When typing some
search terms, the fuzzy search has precedence over mentions/recent
criteria.
task-3330218
closesodoo/odoo#128896
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: bus, calendar, im_livechat, web, website_livechat.
This PR adds the possibility to set the current user during tests as
well as the mail guest. This will be used to test mail guest page and
livechat once the visitors will be treated as guests.
part of task-3332628
closesodoo/odoo#130811
Related: odoo/enterprise#45331
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
With this commit, users can send voice messages in channels and chat.
There's a new button in composer to record audio from the microphone,
up to 1 minute clip duration. This adds a voice attachment with its
dedicated voice player that shows waveforms and allows playback.
To ensure compatibility in all supported browsers, we choose to
encode voice recording with `audio/mp3` thanks to lib `lamejs`.
Task-3240168
closesodoo/odoo#117036
Related: odoo/enterprise#45482
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, the follower loading spinner was shown
for draft records until it was saved. This is incorrect,
follower count should instead be 0. This commit fixes this
issue.
closesodoo/odoo#131224
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>
This commit removes the legacy implementation of the MockServer
and test utils making it available in the test environment (e.g.
addMockEnvironment).
Part of task~3439226
closesodoo/odoo#130671
Related: odoo/enterprise#45141
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Before this PR, the user during livechat embed tests was the admin partner while
it should be the public partner. This commit fixes the issue.
part of task-3332628
closesodoo/odoo#130429
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Before this commit, a patch was used to modify some classes in place
but these classes were declared some lines just before the patch.
This commit replaces those patches by mixins, it's a better way to
provide a same extension to multiple classes as the extension is
done by the language.
Task: 3410198
Part-of: odoo/odoo#125716
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.
task 3410198
[1]: 19ea1ac08043e22a811630968e44715cc3bfc495
Part-of: odoo/odoo#125716
Before this commit, an event listener was added on
several registries to copy the required registry for
mail tests. The registries should be copied once when
the test suite begin to avoid side effects in tests.
closesodoo/odoo#130461
Related: odoo/enterprise#45014
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit introduces various fixes regarding the avatar card.
First one makes sure that the avatar card popover won't launch when
there is no user image associated with the many2one_avatar_user_field.
Second one prevents the card from opening when the related model is not
"res.users".
Third one allows to display the phone number of users even without hr
installed and makes sure that the work_phone and work_email are shown
in priority if available when hr is installed.
Direct fix to Task-3167110
closesodoo/odoo#129876
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Now that most of the webclient codebase (fields, views, client
actions...) has been converted to owl, the legacy extra next tick
used in a lot of tests is no longer necessary. This commit removes
the helper and its usage. At some places, a real tick was needed,
but we didn't see it because of the use of the legacy extra next
tick.
Part of task~3439226
closesodoo/odoo#130236
Related: odoo/enterprise#44869
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
luxon and moment are both used in the solution,
but these two libraries facilitate the manipulation
of dates. It was decided to replace all uses of
moment with luxon so we can then remove
moment.js from the code and lighten the assets.
task-3391739
closesodoo/odoo#128752
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
*: im_livechat, website_livechat.
Before this PR, services has to be added to the setup manager in order to be loaded in tests. This was cumbersome because the setup manager was patched by each sub-feature to add feature related services to the registry. The same had to be done for systray/main components registries.
This PR automates this process in order to remove the patches.
closesodoo/odoo#129705
Related: odoo/enterprise#44596
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Before this commit, chat windows state (open/close/folded) was not
syncing between browser tabs. This lack of feature makes using chat
in crosstab quite inconvenient.
This feature exist in 16.2 and was mistakenly removed from rewritting
of Discuss code in 16.3. This commit reimplements as it was in 16.2.
Task-3435120
closesodoo/odoo#129812
X-original-commit: 8f27d1f254e79becf6886cdb90a1af14b28e9946
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit adds the possibility to see additional information about a
user with a card that appears when hovering avatar user fields for a
set amount of time. This card contains the following information:
- Avatar
- Chat status
- Name
- Email
- Button to send message
and with HR installed:
- View profile Button
- Job position
- Department
- Phone number
- Advanced chat status (when hr_holidays is installed)
Task-3167110
closesodoo/odoo#121943
Related: odoo/enterprise#44563
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
This PR focuses on partner invitations for livechat channels:
- Add "invite a user" button to the member list
- Sort partners by availibility (partner is a livechat operator
and connected) then most invited users (by the current partner)
- Display partner lang of suggested partners
part of task-3332872
closesodoo/odoo#128834
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Before this commit, when opening a chat on a very narrow mobile
device (e.g. 300px width), there was the following crash:
```
TypeError: Cannot set properties of undefined (setting 'hidden')
```
This happens because the computed maximum amount of visible chat
windows was 0, which prevented the good opening of chat window.
Indeed, the code relied on at least a `CHAT_WINDOW_WIDTH`, which
is 360px.
This commit fixes the issue by guaranteeing that it is always
possible to make 1 chat window on the screen, regardless of the width
of the device.
closesodoo/odoo#129474
X-original-commit: 1c9289fffe2a8d0936a1afa99255777ff275c712
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when receiving a link preview deletion
notification of an unknown message, there was a crash.
This happens because the handling of the link preview deletion
notification assumes that the message linked to the link preview
is known by the JS code. But this might be wrong in the case that
the message was not loaded.
closesodoo/odoo#129460
X-original-commit: 28beec42ac8b731170517a6aa5d7c99623a5a87c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when editing subtype of a follower
(click on pencil icon to edit), the subtype dialog was
displayed while keeping the follower list dropdown open.
This happens because `FollowerList` makes use of
`Dropdown` and `DropdownItem`, and by default they manage
closing of dropdown item when clicking away of when clicking
on the dropdown item. However, when there are specific clickable
elements on the `DropdownItem`, the clicks do not auto-close the
dropdown menu.
This commit fixes the issue by specifically close the dropdown menu
when clicking on edit button of a follower in follower list.
Task-3435443
closesodoo/odoo#129413
X-original-commit: a33f60356ba7c12bd854eb0efe5c653ff1559495
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when using Odoo with many tabs and when posting
a message in a DM chat, the other tabs had an alert as if we received
a new message from someone else.
This happens because the condition to trigger a new message alert
were not considering the author of message, thus any new message in a
chat where triggering the sound. This only happens when many tabs
were open, because somehow the tab is sometimes not considered in
focus.
There are likely some corner-cases with `isOdooFocused` where it's
not properly syncing among tabs are wrongly considered as
out-of-focus. This bug of out-of-focus, while more delicate to
understand and fix it, is not critical and thankfully is not a
necessity to fix this problem on receiving self-messages in chats.
opw-3425658
closesodoo/odoo#129361
X-original-commit: f59805825c55663f7381204da8f0bdfe63ccd1d8
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
This commit revert the changes from this PR https://github.com/odoo/odoo/pull/127377
Before this commit:
Chat window shows all 7 rtc buttons due to this the alignment of the button
is not set because there are way too many buttons.
After this commit:
This commit fixes the issue by showing only 5 buttons Mute,Deafen,Video,More,
Close call and other 3 buttons will moved in expandable More menu.
The testcases were changed accordingly.
Task-3346085
closesodoo/odoo#129360
X-original-commit: 909fb073eada42ff22c4ef4b20b44dc5536b250e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the message actions "Add to Favorite" and
"Mark as Unread" were shown in the Discuss public page For guests.
These buttons should not be present in public page for guests,
as they both require at least the user being authenticated.
This commit fixes the issue by not showing these 2 actions
"Add to Favorite" and "Mark as Unread" on messages in the Discuss
public page as guests. Internal users can still see both features
in the public page
Task-3430586
closesodoo/odoo#129359
X-original-commit: b551f8799ccee443fc0c6a1e8d4a5e2b8e673c57
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
This commit adapts the code in addons w.r.t. the introduction of
the RelationalModel.
Main changes that were requested are:
- record datapoints no longer always have an "id" key in their
data (they still do if the id field is in the view), so we use
record.resId instead
- the new model is based on fined-grained reactivity, so several
components that previously relied on onWillUpdateProps to update
their internal state no longer worked. Typically, using the hook
"observeRecord" is the way to go now.
- specialdata are no longer handled in the model, so the components
needing specialData can use the hook "useSpecialData"
- more generally, all overrides of models (RelationalModel or
KanbanModel) needed to be reworked.
Part of task~3179751
Part-of: odoo/odoo#114024
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.
In this commit,
the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.
Example :
registry.category("web_tour.tours").add("example", {
test: true,
steps: () => [
{...},
{...},
],
});
task-3292454
closesodoo/odoo#124157
Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Clicking on chatter notification from the messaging menu should
either open chat window or form view, depending on whether the
discuss app is closed or open respectively.
Before this commit, when discuss app was open and user clicks on
messaging menu item related to chatter notification, it was opening
the chatter in discuss app. Although it works, some features seem
missing, such as lack of chatter-specific features, and missing
entry in the app sidebar. The discuss app is designed to work
only on `discuss.channel` threads, therefore chatter threads should
never be shown inside this app.
This commit fixes the issue by ensuring that all opening of chatters
from the discuss app opens the form view.
closesodoo/odoo#128809
X-original-commit: 94c12dd231212e2e52b626a380344623c8627d7c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit implements a new widget in mail, `StatusBarDurationField`. Purpose:
seeing how long a record has spent in each stage in a form view.
It is implemented for records with a `many2one` status field and gets the data
from the `duration_tracking` field of the record. `duration_tracking` is computed
by adding the `mail.tracking.duration.mixin` to a model.
Time is shown using a luxon Duration object. "narrow" specifies that time is
expressed with one character and luxon takes care of translations.
Task-3032773
Part-of: odoo/odoo#108554
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 commit, the data of all followers of a chatter were
fetched whenever `mail/thread/data` was called. This route is
called when loading the chatter for the first time, and whenever
the chatter must be reloaded.
When there are at most dozens of followers, it's not a big deal.
However, with thousand of followers, the route `mail/thread/data`
may become quite long, which made chatter barely usable with a
long loading.
This commit fixes the issue by showing only 100 followers at once
when opening the follower menu. When scrolling down the list,
it loads data of more followers.
Task-3293718
closesodoo/odoo#127966
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Before this commit, a test of call was using the real web media API
and would request micrphone access to the brower. This commit fixes
this issue by using the mocked version for this test.
closesodoo/odoo#128722
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>