1. always show the name of the assignee.
2. replace the icon with avatar
3. bold the time info.
task-3142628
closesodoo/odoo#116349
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit adds a menu to see reaction on a message.
It can be accessed from message options or from long press in mobile.
Task-2641441
closesodoo/odoo#116022
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This PR fixes the `19916` issue on the `test_mail_channel_public_page_as_guest`
test.
The messaging service subscribes to bus notifications before it is fully
initialized. This test is composed of two tours. In the first one, the guest joins
the channel and receives the "guest has joined the channel" message. Then, the second
tour starts and the local storage is cleared. Since the local storage has been cleared,
the guest receives this message again, potentially before messaging has been initialized
which leads to a `channel_pin` rpc. This RPC fails with `SessionExpired` error and the tour
is stuck and eventually, fails.
closesodoo/odoo#118000
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit improves the overlay icon that appears on call participant
cards when an error in the media players occur. The icon is now
clickable, which restarts an attempt to play all the `HTMLMediaElement`s
of the call as a recoverable error can occur when the browser does not
allow `HTMLMediaElement`s being played outside a user interaction.
other related changes:
* removing the `pointer-event:none` from the overlay as it was preventing
hover events, and the title tooltip from appearing.
* removing the try/catch around the `srcObject` assignment, as it should
only crash on old browsers without support for `srcObject` for which the
support of using the alternative (`URL.createObjectUrl` with
`src`) is being dropped.
closesodoo/odoo#117446
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit adds a new prop to the Dropdown component: autoOpen.
It is true by default and follows the current behavior of all
current dropdowns (automatically open the dropdown when it is
hovered and a sibling is already opened) when set to true and
disable this feature for the dropdown when set to false.
The commit also applies this new property and set it to false on
all small icon dropdowns that are present by default in the
enterprise navbar to facilitate navigation with these (debug,
messaging and activity)
opw-3259473
closesodoo/odoo#117622
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
When using the composer on a non-thread model a notification is sent instead
of posting a message, as the model does not support the posting process.
However there is currently a crash due to the default subject computation
which is solved in this commit.
Task-3254379
Part-of: odoo/odoo#117763
While we run cron `Data Merge: Find Duplicate Records` an issue raises because
`data_merge.model` has no method `_message_compute_subject`. Indeed it is
possible to notify on non-thread models but that method is a thread-only
method.
In this commit, we only call `_message_compute_subject` when it's available
in model.
sentry-3947126655
Task-3254379
Part-of: odoo/odoo#117763
Some code in handle notification wrongly assumes `store.user`
is set, as it reads `user.id`. This is correct when the user
is authenticated as an internal user, but for guests this is
incorrect.
This commit adapt code of handling notifications so that
`store.user` can be undefined for guests.
Fix runbot issue 19978
closesodoo/odoo#117647
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This happens intentionally on tours that finishes successfully
before the emojis are fully loaded. Notably short tours like
public discuss page show this case.
The console.warn still trigger unhappy runbot. Functionally
the emoji picker shows "Failed to load emoji", so this warning
becomes useless.
Fix runbot issue 20081
closesodoo/odoo#117642
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
This may happen when receiving a new message without setting
the self persona yet.
Fix runbot issue 19975
closesodoo/odoo#117633
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.
task id: 3162300
closesodoo/odoo#117305
Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
Since this component is imported and used in many places, it is more
convenient to move this component a core component instead of a
component made exclusively for the Many2ManyTagsField component.
This change makes the usage of TagsList possible by SelectMenu, which
would create issues as the fields folder should not be imported in
other modules.
Part-of: odoo/odoo#115799
This commit exports the function responsible for setting up the mail registries in tests.
This is usefull if one doesn't want to instanciate a full webClient in tests and still have mail features.
Part-of: odoo/odoo#115799
Before this commit, the portal user get a Access Error.
After this commit, the portal user see the chatter without error.
The code works with reaction browsed in sudo, but since we use a ior
with a record not in sudo, we loose the sudo flag and so the right for
portal user to read it.
```py
x = record.sudo()
y = record
x |= y -> (x, y) in sudo
y |= x -> (x, y) not in sudo
```
How to reproduce ?
Assign lead to a portal user
Post a message with another user like demo on the lead
Add reaction with the admin user
Open the opportunity on the portal with portal user
-> access error
opw-3215507
closesodoo/odoo#117313
X-original-commit: 2bde53541b7a0171c7d1b89e0e412d624f5eab37
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
The commit change the design of the Many2ManyAvatarFieldPopover the goal
is to remove the m2m dropdown and fill the dropdown content directly
inside the popover.
It also reverses the order of the displayed tags inside the m2m avatar
field in the kanban view and inside the popover.
It removes the possibility to unassign users on mouse hover in kanban
view.
Note:
It's still possible to remove users inside an m2m_avatar_field popover.
Task ID: 3229888
closesodoo/odoo#117194
X-original-commit: f0d71e98743421318a798ef9d4f1e75d11a23334
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
In the last refactoring*, the click event handler from the old code
was missed, calling an undefined function, which can cause a crash
on some browsers.
This commit fixes this issue and implements the expected behavior of
preventing the propagation of the click to the parent handler that
closes the attachmentViewer.
\* https://github.com/odoo/odoo/pull/110188closesodoo/odoo#117288
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Before this commit, when in home menu with a chat window,
it was not possible to copy content in conversation with
CTRL-C.
This was due to keydown event being intercepted by the hidden
home menu input.
This commit solves the issue by not propagating keydown events
above chat window, so it's not intercepted by the home menu for
his input.
closesodoo/odoo#117211
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Read more/less requires content being `t-ref="body".
It was not properly set for messages of type notification, thus
skipping the read more/less insertion in the content.
closesodoo/odoo#117203
Signed-off-by: Alexandre Kühn (aku) <aku@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>
Currently there is no way of knowing who changed the address
of a partner. This field is of high importance and should be
tracked to be able to follow who is editing it.
As addresses are represented with a bunch of fields, tracking
them individually would result in weird-looking tracking
messages with each value stacked on top of the other.
To avoid this, we take advantage of the fact that tracking can
be used on non-stored compute fields to log any change as a
change over the full address.
The full address is derived from the contact_address field to
take advantage of the existing regional formatting of addresses.
It is however modified to replace return to lines with commas to
accomodate the formatting of tracking messages in the front-end.
task-3165293
closesodoo/odoo#114695
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
1. Display no result when having no matched results.
2. Hidden when clicking outside of the field.
3. Be visible when clicking inside the field.
4. Add related tests
task-3208033
closesodoo/odoo#116214
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>
- Bigger and centered emojis in grid
- Better visual clue of focused input from search icon
- No search screen with icon + text
- Consistent sizing of emoji picker in case of failure
- Added basic test for active highlighted category
closesodoo/odoo#117001
Signed-off-by: Debondt Didier (did) <did@odoo.com>
Use case
--------
If the a user has partner_share set to NULL not to 'false'
he will not receive any notification
The orm consider False and NULL value as False for boolean field,
the query that fetch the recipient data should have a consistent
behavior
closesodoo/odoo#117083
X-original-commit: a50fbd1f9404fd05eb576474eb3d10c94d37aa52
Signed-off-by: Thibault Francois <tfr@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When the template layout was made more mail-client friendly in 16.0
we used padding on a <td> node with
a color background to make it look like a button with centered text.
This approach makes most of the button unclickable.
The fix is to put the padding inside the link itself so that the whole
'button' is clickable. We already do this for most templates.
task-3168757
closesodoo/odoo#116945
X-original-commit: c40327db4f46040d4a6ed0231afcdefd5be47db5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, tour may end before emojis are loaded.
This results in following crash:
```
Trying to set result to failed (AssetsLoadingError: The loading of /web/assets/3949-d14fea7/mail.assets_emoji.min.js failed
at HTMLScriptElement.<anonymous> (http://127.0.0.1:8069/web/assets/3709-a5ab371/mail.assets_public.min.js:7008:270)) but found the future settled (<Future at 0x7fee7552a410 state=finished returned bool>)
```
This commit hides the crash in case the loading of emoji fail,
and instead show emoji picker without any emoji.
Fix runbot issue 19877
closesodoo/odoo#116845
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@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 commit mocks the "preference_save" action on the res.users model during
the test that checks that the user can modify its own preferences.
This allows to ease the testing as a context reload in the middle of test steps
was not handled correctly by the test runner.
Task-3246086
closesodoo/odoo#116800
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Before this commit, it was not possible to scroll
inside long activity menu.
Dropdown already manage scroll, so the content should not put
overflow management, to the risk of introducing scrollbar twice
or making content non-scrollable.
Task-3249174
closesodoo/odoo#116815
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Steps to reproduce:
- Install l10n_mx modules
- Switch to MX company
- Create invoice and confirm it
- Send it to PAC in test environment (Process Now button)
- Click Send & Print button
Issue:
- XML Preview does not display, only shows the file name in the top right corner of the chatter.
Cause:
In l10n_mx_edi, when posting the invoice, the only attachment available is the xml sent to the government in `_message_set_main_attachment_id`.
Therefore the xml is set as the main attachment.
When clicking on "Send and Print", the pdf is generated but the main attachment is still the xml
Solution:
Redefine the main attachment everytime the the main attachment is an xml
Note:
- octet-stream have also been filtered out
opw-3085934
closesodoo/odoo#116784
X-original-commit: 48e6e81a47f5371f5985d135e56f39f445eb2854
Related: odoo/enterprise#38861
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adds a button to the `CallActionList` to signal to the
other participants of the call that one is raising a hand.
This will add a hand icon to the `CallParticipantCard` of the people
with a raised hand and send a notification that is displayed in the
`Call` view (only when in discuss, not in chat windows).
task-3229507
closesodoo/odoo#116658
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The web client has a mechanism to invalidate the action and the view
cache: in the basic model (and the relationalmodel), some code is
looking for updates to some specific models (such as ir.actions) and
trigger a `CLEAR-CACHE` event. This event is then listened by the action
and view services to properly clear the caches. This mechanism was also
used to reload the page after editing a company, or reloading the
currencies after editing some currency.
With this commit, we modify the orm service to trigger an event after
each rpc. This event can then be used by the action/view service, and
also by the currency/company services to perform their specific cleanup.
This work is one step in the future refactoring of the relational model.
closesodoo/odoo#115655
Related: odoo/enterprise#38814
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, we were trying to access
`channelMember.thread.channelMembers` when inserting a member, but
some inserts come without this key.
A traceback could occur when inserts of `rtcSession` records came
with a `channelMember` with little information on their thread.
closesodoo/odoo#116656
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
If applied, this commit will solve the keyError for _invalidate_documents.
Before this commit:
============================================
KeyError 'rating' or 'False' occurs when a user tries to send a message and
_invalidate_documents() takes the parameter model equal to 'rating' or 'False'.
but the model 'rating' is not available in the database and It will be accessed
by the self.pool[model].
After this commit:
============================================
Solved the issue when the model 'rating' is not available or the model is 'False'
while sending a message.
sentry - 3956327451
closesodoo/odoo#116302
X-original-commit: 5becbca6531d5829bee262a5c1b64ae5e0917f8e
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>