Commit Graph
3062 Commits
Author SHA1 Message Date
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Xavier BOL (xbo) a6e7c41d5e [FIX] mail: fix className can be null in mixin
Before this commit, the className can be null and then this processing:
`this.className += ' o_clickable_m2x_avatar';` gives
'null o_clickable_m2x_avatar' in the class of the element classList.

This commit checks if the className is not null if yes, then we add the
the class otherwise the className is created in this mixins.

closes odoo/odoo#71461

X-original-commit: d25459e6cb
Related: odoo/enterprise#18605
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-06-01 08:14:15 +00:00
Sébastien Theys c6716847aa [IMP] web, *: clean up notification API
task-2476867

closes odoo/odoo#67009

Related: odoo/enterprise#16760
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-27 13:47:23 +00:00
std-odoo 1b8c4d98d3 [REV] mail: fix a traceback when sending a message in a "email channel"
Bug
===
Since 4da64b3f3c , if multiple users of
different companies are in the same channel, and if the type of the
channel is "email", a traceback is raised when sending a message.

Technical
=========
"with_user" drop the SU flag and is not enough to bypass the multi
company ACLs. Moreover, we do not want to send a "channel_seen" bus
notifications and we can mark the message as seen on the JS side
directly.

Changes
=======
So now, the traceback is not raised anymore in that case, and the
message is marked as seen if the receiver has the web client open.

But, if the receiver has not the web client open, when he will login,
the message will not be marked as seen. This can be improved but at the
moment we just want to revert the fix that cause the traceback and fix
the issue in most cases.

Task 2427790

closes odoo/odoo#71320

X-original-commit: 8b5de95bea0087c48d17f40847750eb31fe97caf
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-27 09:26:10 +00:00
Mohammed Shekha d25459e6cb [IMP] mail,web: add many2many_avatar_user widget to open chat
with this commit, we adds many2many_avatar_user widget to have same behaviour
as many2one_avatar_user where clicking on avatar image opens chat box, so to
have same feature on many2many_tags which is related to res.users we adds
many2many_avatar_user widget.

task-2451204
2021-05-26 14:04:15 +00:00
Dhruv Patel 885a642a9b [FIX] mail: chat window should remain folded on new message
If the chat window was initially folded and when a new message is received
the chat window automatically unfolds. it is annoying having a window that
pops up each time a new message is coming while having folded it once.
So, It should remain folded when a new message is received if the chat
window is already folded.

Task : 2522141

closes odoo/odoo#71258

X-original-commit: 6e84914a3691735e9c97084cc8d55788babd2ad9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-26 10:56:13 +00:00
Mohammed Shekha ccc56e28a3 [IMP] *: replace fa-spinner with fa-circle-o-notch
Slightly improve the overall UI of Odoo with a more modern feel by updating the
current 'loading' icons that look quite old school.

Use fa-circle-o-notch instead of old style fa-spinner

task-2346142

closes odoo/odoo#59454

Related: odoo/enterprise#13908
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-21 11:48:32 +00:00
Mohammed Shekha 5a0a1e76b3 [IMP] web: improve many2one_avatar widget for form edit mode
with this commit: we improve many2one_avatar widget for editable form view,
previously many2one avatar in edit mode was not displaying image, it was
displaying only many2one selection input, this commit adds image before
many2one input to have unify design with readonly form view.

This is especially motivated by the fact that we plan on getting rid of the
readonly formview to always be in edit mode.

task-2451340

closes odoo/odoo#67366

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-21 07:09:33 +00:00
Aurélien Warnon 9fe442f384 [IMP] mail: change strategy for onchange_on_keydown from throttle to debounce
The FieldChar and the "Emoji" fields support a "onchange_on_keydown" attribute
that allow triggering the onchange event when the user types into the field.
(Instead of having to wait for a blur event).

This is especially useful, for example, in the social module to refresh the
post preview when the user is typing his message.

The current strategy to avoid spamming this onchange event was to throttle the
method to trigger it at most once every second.
However, triggering it every second could still be problematic in terms of
performances and could cause loading issues (e.g: if you have a large GIF in
your post preview)

To try to mitigate this issue, we changed the strategy from throttle to
debounce and changed the delay to two seconds.
Meaning the onchange will be triggered 2 seconds after the user is done typing,
which still gives a nice "live update" effect without triggering the onchange
too much.

Task-2500821

closes odoo/odoo#69023

Related: odoo/enterprise#17573
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-17 10:32:55 +00:00
Romeo Fragomeli 8a755d5833 [REF] web,*: hide buttons that doesn't work in webviews
Some features of the PDF.js library doesn't work in the
webview of the mobile apps.

Initially 'window.print' is defined as an empty function in
webviews unlike browsers where it is already ready.
After that, PDF.js needs to monkey patch 'window.print' and
saves a reference to the original definition, which is not
yet fulfilled in by the mobile app (Java part).
So the print of PDF.js doesn't work in webviews and end
users will need to download the file before printing it.

Regarding the Download button, the 'download' attribute is
not supported by the webview as you can see in:
https://bugs.chromium.org/p/chromium/issues/detail?id=432414
As there's many ways to download a file in Odoo it's not
a big deal to simply hide it in PDF.js.

Because it's quite complicated to fix this, we decided
to hide the features that don't work (Download / Print)
or don't make sense (Open file).

Task-id: 2200168
2021-05-07 11:01:27 +00:00
nounoubensebia fa0738dd7e [FIX] mail: display default name for followers for "other address" partner
Display the default name (the one displayed in the kanban view) for followers replacing
the False value for "other address" partners, this way the user won't get
confused, furthermore, this fix won't require the name to be mandatory for this
type of contacts.

Task-2514244

closes odoo/odoo#70445

X-original-commit: 338b84bd9d2d675af30ab19c6bb262d2f68546b9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-06 08:00:36 +00:00
Achraf (abz) 40204d6575 [FIX] mail: Allow to navigate quickly among the different attachments
What are the steps to reproduce your issue ?

    1. Create a record and add two attachments
    2. Navigate quickly between these attachments

What is currently happening ?

    Traceback
    TypeError: Cannot read property 'complete' of undefined
        at AttachmentViewer._handleImageLoad (https://www.odoo.com/mail/static/src/components/attachment_viewer/attachment_viewer.js:163:20)

opw-2521901

closes odoo/odoo#70334

X-original-commit: 2b3ad9bfa9459b8e39d769afa8fa61ceef925c75
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-05-04 13:28:14 +00:00
Sébastien Theys 446e20742c [IMP] mail: add update command and use it on thread viewer
Instead of thread viewer having many dependencies, this allows models "having
the thread viewer feature" to keep their own logic for themselves.

The "create or update" part has to be done manually in this case (as opposed to
using "insert") because thread viewer has no clear identifying data, since it
would depend on which model is using it in the first place.

closes odoo/odoo#70251

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-05-03 15:11:07 +00:00
Sébastien Theys 7de0a02980 [IMP] mail: flag JS "on change" fields as such
There is currently a limitation with required fields because an "on change"
compute might trigger the check for "required" before all the actual computes
have been done, leading to the required field check incorrectly failing.

The main goal is to ensure the "on change" computes are done after all the other
computes and after the check for required fields.

A check has also been added to ensure no "real" compute can trigger update cycle
side-effects anymore.

Opportunity is also taken to prevent from checking for required fields on a
record that was deleted as part of the same update cycle.

Somewhat part of task-2278551

closes odoo/odoo#70204

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-05-03 11:52:26 +00:00
Sébastien Theys 8f6603db45 [IMP] mail: compute messaging menu counter with dependencies
It was the last remaining usage of the deprecated `_updateAfter` which is
therefore removed too.

Part of task-2258617

closes odoo/odoo#70170

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-04-30 12:02:20 +00:00
Simon Genin (ges) ecfe85db84 [REF] web: static/src/(img|fonts) => static/(img|fonts) 2021-04-29 07:34:40 +00:00
yograj tandel fa6222e7fd [REM] mail, *: remove bugfix files
currently, Across Odoo, there are bugfix folder in around 13 module,
New manifest system allows to add new files in stable so the bugfix files are no
longer required.

after this commit,
all the bugfix files are removed from all module.and all the code in those file
is maintained as per New manifest system.

Task : 2510653

closes odoo/odoo#69830

Related: odoo/enterprise#17936
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-27 08:34:58 +00:00
Dhruv Patel 11b85c7c13 [FIX] mail: small image attachment preview too small for its box
In the chatter, the attachment preview image size is fixed with 160*160
but the actual preview area is 200*200px so the image is not filling correctly.
It appears padding around the image, especially visible when hovering it.

So with this commit, We should make sure to use a properly sized image in the
preview. we have to also provide the perfect resolution and preview for
the small images without upscaling incorrectly. For large images, it should be
display based on the aspect ratio.

Task : 2483885

closes odoo/odoo#69755

X-original-commit: 08f152bb9ceb6bd4560aa177b392b0420162e131
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-23 11:12:18 +00:00
Qiuyu (QHO) bd67479316 [REF] mail, mail_bot, im_livechat, *: convert JS files to ES6 modules
task id: 2487514

closes odoo/odoo#69376

Related: odoo/enterprise#17749
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-19 13:33:35 +00:00
Aurélien Warnon b518c2f2ca [IMP] mail: correctly support hidden textarea with emojis mixin
This commit fixes the scss file to correctly hide emojis button if they are
linked to a Text-type field that is also hidden (using attributes, attrs, ...).

Task-2209729
ENT PR odoo/enterprise#14027
UPG PR odoo/upgrade#2333
IAP PR odoo/iap-apps#284

closes odoo/odoo#63220

Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2021-04-02 07:08:04 +00:00
Didier (did) 6fad0e09b1 [FIX] mail: detect a bigger range of URL in messages
Current URL regexp doesn't support special, but still valid, character like `é`,
`è`, `ỗ`, `ặ`, etc.

Url like `https://tenor.com/view/chỗgiặt-dog-smile-gif-13860250` are not going
to be matched correctly.

This commit adds the support for Latin-1 Supplement, Latin Extended-A,
Latin Extended-B and Latin Extended Additional unicode.

Some relevant stackoverflow discussion:
https://stackoverflow.com/questions/20690499/concrete-javascript-regex-for-accented-characters-diacritics

task-2088895

closes odoo/odoo#68670

X-original-commit: 1f9c171115d8bbd81d382e353f3faadab16aedfc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-01 18:44:08 +00:00
Alexandre Kühn 1874d6e827 [IMP] mail: Attachment viewer header UX on mobile
Task-ID 2200168

closes odoo/odoo#66614

Related: odoo/enterprise#16579
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-31 16:53:24 +00:00
Hiral Bhavsar f25d55bc3a [IMP] mail: highlight messages mentioning the current user
PURPOSE

Attract the attention of the user on messages that need action from him in the
mass of messages that are sent in a channel.

SPECIFICATIONS

Highlight messages mentioning the current user in a channel.

Task-2365956

closes odoo/odoo#66889

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-30 06:13:39 +00:00
Alexandre Kühn f5acf714b0 [FIX] mail: no traceback on uploading attachment
Task-2486731

closes odoo/odoo#68431

X-original-commit: fb713f58b20835bd9bc5257f87817628ff1cf69a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26 22:17:10 +00:00
Dhruv Patel 0faeb2b769 [FIX] mail: chatter autoloading loads more messages too quickly
if you check on any chatter with a lot of messages, you will see that it starts
loading all the messages as soon as you scroll down even just 1 pixel.
This makes a lot of loading of the messages for no reason unnecessarily.
What should happen instead is that it should load more message only when
scrolling all the way down to the bottom.This works fine in chatwindow & discuss.

With this commit, resolved this issue by providing the exact scrollable element
to the message list from parent component to the child. so with proper element
we can have proper scrollable heights and other dimensions as well to handle
load more messages properly.

Task : 2382735

closes odoo/odoo#68430

X-original-commit: 63b15e23d95b310a12bdbc30c983081ed84187a3
Related: odoo/enterprise#17335
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26 20:34:16 +00:00
Priyanka Kakadiya fc34260bee [FIX] mail: command suggestion should only show if '/' is first char
PURPOSE:

command suggestion should only open if command is the first char.

SPECIFICATION:

command suggestion should only open if command is the first char.

Task-2487518

closes odoo/odoo#68428

X-original-commit: 2208a9b5e18881f5fbfea56872990daafba45579
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26 19:52:37 +00:00
Xavier Dubuc 49663be314 [FIX] mail: fix attachment preview for previewable files
task-2412150

closes odoo/odoo#68427

X-original-commit: 2e1bcb079ec361d85a80d790b8a2cc395055f09a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26 19:51:11 +00:00
Priyanka Kakadiya 725a1b674d [FIX] mail: do not show typing when using a / command
PURPOSE:

Currently typing status is sent when typing a command.

SPECIFICATION:

Typing status should not be sent when typing a command.

Task-2363267

closes odoo/odoo#68424

X-original-commit: 7f28e68776849993f16b4b27e6213c0cce67de37
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26 19:04:07 +00:00
Ipsita Borisagar 5c4133f074 [IMP] mail: display subject in chatter
PURPOSE

Currently subject of message is visible in Discuss' Inbox and mailing channels,
need to add subject into chatter and non mailing channels.

SPECIFICATION

Adding subject into the message in chatter and non mailing channels.

LINKS

PR https://github.com/odoo/odoo/pull/61570
Task-2156170

closes odoo/odoo#61570

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-23 10:11:37 +00:00
Qiuyu (QHO) c3ae559bf7 [IMP] mail, *: replace [] commands by FieldCommands
closes odoo/odoo#67643

Task-id: 2453408
Related: odoo/enterprise#17036
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-23 12:51:24 +00:00
Xavier DubucandSébastien Theys e3ecccd641 [FIX] mail; hr: restore faster and more accurate mention suggestions
The code from v13 used to look for partners in JS before making the RPC, which
was much faster, and also gave better results by returning partners that were
already known and therefore more likely to be selected.

The same logic is reintroduced here, and further improved to take into account
all known partners and sort them according to the likeliness they will be
selected based on various criteria.

task-2413776

closes odoo/odoo#68045

X-original-commit: 930e090ced8134c3819a5a87b9052467ba23e8e4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2021-03-18 10:32:27 +00:00
Thibault Delavallée e5338146e7 [REF] mail: make message belongs to a single thread without listener channels
RATIONALE

Channel model is a mail.thread enabled model behaving strangely with followers,
notifications and discuss. Its code should however be simplified to be more
self contained and avoid unwanted side effects on other models.

PURPOSE

Remove channel ability to follow records as it mainly adds noise without a lot
of added value. Simplify channel notification flow by using directly members
and not a delegation through a channel self-following trick. Remove followers
being channels and posting with added listeners being channels.

SPECIFICATIONS

In this commit we force messages to belong to a single document using
``model`` / ``res_id`` pair. It is not possible anymore to link a message
to channels using ``channel_ids``. A message belongs to a document and
is displayed in that document's chatter.

This change implies modifying a lot of domains, notably in chatter. Indeed
discuss for channels does not use ``('channel_ids', 'in', [3])`` domains.
They now use ``('model', '=', 'mail.channel'), ('res_id', 'in', [3])`` like
other documents fetching their messages.

This commit also removes ``channel_message_ids`` field on ``mail.channel``
model. As channels are now considered as standard documents they will use
``message_ids`` field like all other documents. Linking a channel on a message
is possible only as a link in message from now on. It is not possible to push
it into a channel anymore (no more listener channels, no more channel link).

Finally a global cleaning also linked to all previous commits is done.

LINKS

Task ID-2070632 (main task)
Task ID-2419762 (followup task)
COM PR odoo/odoo#62859
ENT PR odoo/enterprise#15172
UPG PR odoo/upgrade#2005
2021-03-17 18:16:35 +00:00
Thibault Delavallée 4cb1f56aba [REF] mail, sms, test_mail: remove now unused channel_id field on Py and JS follower models
RATIONALE

Channel model is a mail.thread enabled model behaving strangely with followers,
notifications and discuss. Its code should however be simplified to be more
self contained and avoid unwanted side effects on other models.

PURPOSE

Remove channel ability to follow records as it mainly adds noise without a lot
of added value. Simplify channel notification flow by using directly members
and not a delegation through a channel self-following trick. Remove followers
being channels and posting with added listeners being channels.

SPECIFICATIONS

As there is no way to add channel-based follower anymore we can remove all
fields and code supporting this feature. Notably we can remove ``channel_id``
field on ``mail.follower`` model as well all code using it, notably compute
methods.

In this commit we also make ``partner_id`` field required as now followers
are always partners. Email, name and active fields are now simple related
fields on the partner.

Code computing data about subscription is also updated and simplified. As
we do not have channels anymore but only partners all custom SQL queries
are now simplified.

JS models for Discuss are also cleaned. Following python change, JS models
are simplified to match the backend models. Channel_id is removed, partner_id
is now required, and various code is updated according to the simplified
model.

Side note: we could probably get rid of specific index on ``partner_id``
field. However we have to ensure we never search for followers without being
in a model / res_id context. This will be done in another cleaning step to
be sure performance are not broken.

LINKS

Task ID-2070632 (main task)
Task ID-2419762 (followup task)
COM PR odoo/odoo#62859
ENT PR odoo/enterprise#15172
UPG PR odoo/upgrade#2005
2021-03-17 18:16:18 +00:00
Thibault Delavallée 1cff7104c3 [REF] mail: remove now unused channel_id field on invite
RATIONALE

Channel model is a mail.thread enabled model behaving strangely with followers,
notifications and discuss. Its code should however be simplified to be more
self contained and avoid unwanted side effects on other models.

SPECIFICATIONS

Remove ``channel_id`` field from ``mail.invite.wizard``. As we removed
support of (un)subscribing channel-based followers there is no need anymore
to have a field to add them in invite wizard. We can now safely remove this
field as it has no use anymore.

LINKS

Task ID-2070632 (main task)
Task ID-2419762 (followup task)
COM PR odoo/odoo#62859
ENT PR odoo/enterprise#15172
UPG PR odoo/upgrade#2005
2021-03-17 18:16:15 +00:00
Thibault Delavallée 7991118bfe [REF] mail, various: remove support of channels from message_subscribe API
RATIONALE

Channel model is a mail.thread enabled model behaving strangely with followers,
notifications and discuss. Its code should however be simplified to be more
self contained and avoid unwanted side effects on other models.

SPECIFICATIONS

Remove ``channel_ids`` argument and support from ``message_subscribe`` and
``message_unsubscribe`` API. Indeed we do not support adding channel-based
followers anymore. Only partners should be added or removed from followers.
It also allows to simplify API and understanding of both methods.

Various addons are updated to match the simplified (un)subscribe API. Some
enterprise addons may also be impacted.

LINKS

Task ID-2070632 (main task)
Task ID-2419762 (followup task)
COM PR odoo/odoo#62859
ENT PR odoo/enterprise#15172
UPG PR odoo/upgrade#2005
2021-03-17 18:16:11 +00:00
Dhruv Patel 7b30af6e77 [FIX] mail: channels alphabetical order should not be case sensitive
Currently, In channels listing, the order of the channels is case sensitive.
The Uppercase names are listing first and then all the Lowercase ones.
but it should be displayed in the alphabetical case insensitive order.

With this commit, we have resolved this issue and now channels are listing
in case insensitive alphabetical manner.

Task : 2453592

closes odoo/odoo#67889

X-original-commit: 4445207161c84d2854055df63013c1361e5d4697
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-15 16:19:20 +00:00
Priyanka Kakadiya a004143a0c [FIX] mail: fix keyboard shortcut issue for small screen
Current behavior before PR:
When having a small screen, the composer in a chat window has no actual
shortcut to send the message.

Desired behavior after PR is merged:
'CTRL-Enter' keyboard shortcut will work for small screen size.

LINKS:
PR https://github.com//pull/65241
Task-2446076

closes odoo/odoo#67724

X-original-commit: 2542f731c5b06c3b451ecde7992d3bb45adb2c60
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-11 18:14:20 +00:00
Qiuyu (QHO) 12660438c0 [FIX] mail: fix array check in model_field
closes odoo/odoo#67702

X-original-commit: f9d0614f28625bd8dfdd5710e465b65935ad5d38
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-11 15:48:15 +00:00
Didier (did) c1504fb429 [FIX] mail, test_mail: ensure thread name is up to date on message
When formatting a message, a message could be with an empty or obsolete
record_name field. It's better to rely on the relation between the message and
the thread and fetch the current thread name.

task-2411715

closes odoo/odoo#63000

closes odoo/odoo#67549

X-original-commit: 51e962803d2048efeb0f7e96a9fe561ac49ee05a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-09 16:46:41 +00:00
Xavier Dubuc b85bde9854 [FIX] mail: do not show falsy value in tracking values messages
task-2438828

closes odoo/odoo#67227

X-original-commit: 49585b8ee726af7edd113c3012b1168d24dc4d7c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-03-04 12:41:05 +00:00
Damien Abeloos 8aa1d6ff02 [IMP] mail: revamp the activity type form view
* Reorganize and reword some of the fields for the activity form type view

* The fields `force_next` from `mail.activity.type` and its related
  field from `mail.activity` are removed.
  Instead, a new field `chaining_type`, which is a `selection` will
  improve the readability of the activity_type form. (It is made more
  obvious that the user has to choose between 2 modes :
    - 'Trigger Next Activity': used when the user wants to specify the type of the
      next activity, which will be triggered once the current activity is done
    - 'Suggest Next Activity': used when the user wants to recommend the
      next activity for the user to schedule once the current activity is done

* To be consistent with this change :
    - The field `default_next_type_id` is renamed `triggered_next_type_id`
    - The field `next_type_ids` is renamed `suggested_next_type_ids`

* The field `default_description` is renamed `default_note` to better match the
  `note` field from `mail.activity`

* About the specific case of activity_type.category = 'upload_file' :
    An activity which has this type's category is automatically marked as done as soon as
    the file is uploaded. This prevents the user from choosing a "next activity type".

    As such, an activity_type with this category can only make use of the
    chaining_type = "trigger", to be part of an automated process.

    An activity_type with this chaining_type should have the
    triggered_next_type_id set (usually required in the Form).
    But, since it does not make sense to set suggested_next_type_ids in this case :
      - chaining_type will stay hidden in the Form
      - triggered_next_type_id will always be shown and is not marked as required in the Form
      - if triggered_next_type_id is not set, chaining_type will be "suggest"

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
UPGRADE : https://github.com/odoo/upgrade/pull/2167
2021-03-03 12:12:52 +00:00
Sébastien Theys 2cc56315a1 [FIX] mail: correct display of channel name in invite dialog
Some characters were not rendered properly, this commit restores the display
as it was in v13.0.

closes odoo/odoo#67095

X-original-commit: 9c8286b8a6fb376aa21b833cb35da044d2eb0e23
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-03-02 16:12:48 +00:00
Dhruv Patel c21d523623 [FIX] mail: chatwindow search autocomplete with long name overflowing
When we search for a name in the chat window having a very long name
of the user will overflowing the screen. The autocomplete dropdown list is
overflowing and rendering out of the screen.

With this commit, we have resized the width of autocomplete dropdown list with
the width of the outer element's width as it's standard behavior.

Task : 2449115

closes odoo/odoo#67063

X-original-commit: 72e96af8dc392796d4e45b96784e7ac50d660127
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-03-02 13:07:47 +00:00
Dhruv Patel 4c54cfc52e [IMP] mail: increase systray message dropdown menu height
The goal of this task to increase the height of the systray message dropdown
to simply allow more messages to be displayed at once for better readability.

Currently, we can see a maximum of 6 chat listing in the dropdown at once and
then need to scroll down for more chats to be listed
but with this commit, We can see more number of chats based on the viewport
height for better readability.

Task : 2428779

closes odoo/odoo#66432

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-03-02 11:17:50 +00:00
Michael Mattiello (mcm)andged-odoo 7086488064 [REF] web, *: remove patchMixin + imp utils.patch
* hr, hr_holidays, im_livechat, mail, snailmail, website,
  website_livechat

This commit removes `patchMixin` and improve `utils.patch`.
`utils.patch` now supports native classes and has a new parameter
used to patch class members.

`utils.patch` is now used everywhere `patchMixin` was and it must
be used to patch classes.

closes odoo/odoo#65967

Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
2021-02-26 10:39:21 +00:00
Alexandre Kühn 14eed232cf [FIX] mail: this.env.services.bus_service is undefined
Before this commit, a page reload or a redirect could raise following
error:

```
Uncaught (in promise) TypeError: this.env.services.bus_service is undefined
```

This happens due to `Messaging` model relying on `bus_service` in its
teardown method `_willDelete`. This is sometimes unsafe because the
bus service may not have been deployed yet.

Task-2468469

closes odoo/odoo#66857

X-original-commit: a444f9c89bb8d5790b8a068a8f120f6ea9d1b17f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-02-25 14:28:20 +00:00
Ipsita Borisagar ab82de7086 [FIX] mail: fix alignement for chatter in window
Before this commit:

For chatter in window, the name of the record is not in an appropriate place in
header as there is an empty space before name.

After this commit:

The name of the record is aligned to the left, and there is no empty space
before the name.

LINKS

Task- 2442652
PR https://github.com/odoo/odoo/pull/65600

closes odoo/odoo#66838

X-original-commit: 699672a0ff474f4550d92657ab22f9c92c7b3b42
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-02-25 12:44:06 +00:00
Alexandre Kühn db1447d4af [FIX] mail: messaging start when bus service is deployed
Before this commit, messaging.start() may crash due to bus service
not yet deployed.

This commit fixes the issue by ensuring `start()` is always called
when the bus service is deployed. To do so, we introduce a new
service (Messaging) that simply waits for bus service deployment
before invoking messaging start.

Task-2468483

closes odoo/odoo#66828

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-25 13:57:53 +00:00
Lucas Lefèvre 4ab5728d01 [FIX] mail: Don't log unhandled notification
The `mail` module logs bus notifications it does not handle. However, some
notifications are not meant to be handled by `mail` and it's perfectly fine.

This commit removes the log to avoid useless noise in the console.

closes odoo/odoo#66683

X-original-commit: e0ae3c6270467985a4d56c902ef109ffc5513b13
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-23 12:20:21 +00:00
Qiuyu (QHO) 099b3cde08 [FIX] mail: functions for FieldCommand should return boolean value
The executing function for FieldCommand should return boolean value
to indicate whether the value changed for triggering the re-computation.

closes odoo/odoo#66681

X-original-commit: a3f5d0b292361a4aa3af8e7662f74150c5d85254
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-23 12:17:13 +00:00