Commit Graph
3161 Commits
Author SHA1 Message Date
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
740168ce8d [REF] web_editor, website_*, mass_mailing: adapt to Odoo Editor
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Sébastien Geelen <sge@odoo.com>
Co-authored-by: Emilien Durieu <edu@odoo.com>
2021-04-01 16:01:06 +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 df013e76bc [REF] mail: do not support listener channels when posting a message
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 remove support of ``channel_ids`` parameter when posting
a message. This means we do not support notifying channels as side-part
of notification mechanism on a document. Either we post on a channel and
its members are notified, either we post on a business documents and its
followers are notified. There is no possibility to add channels as being
notified when posting a message.

This is done as a followup of removing followers being channel-based and
prepares ground to make channel use model / res_id as all other documents
inheriting form mail.thread.

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:20 +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
Ipsita Borisagar d30deb1966 [FIX] mail: prevent message separator for new conversations
Before this commit:

When a new conversation is initiated, the 'new messages' separator is displayed.
This looks a bit weird as there is no history of conversation and thus no older
messages from which new messages should be separated.

After this commit:

The 'new messages' separator will not be displayed in new conversations.

LINKS

PR https://github.com/odoo/odoo/pull/65952
Task-2453511

closes odoo/odoo#66400

X-original-commit: ff44dbf31a3732a8ebced7ff907fff3b2440afc4
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-17 16:51:20 +00:00
bit-odoo cf3cc4bfe0 [FIX] mail: odoo shortcuts doesn't work if chat window is focused
Before this commit:

When chat window is focused odoo shortcuts (with alt) did not work because of
there is stop propagation in _onKeydown method.

After this commit:

Remove stop propagation. Now odoo shortcuts (with alt) work
properly.

Task-2388829

closes odoo/odoo#66280

X-original-commit: 1de3ce47c6ab1a7afaccfda086a6284c0c41dcf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-16 15:05:03 +00:00
bit-odoo 0046d186d0 [FIX] mail: missing discard button if next activity flow
Before this commit:

If a next activity is "triggered", the discard button is not visible.

After this commit:

Even if a next activity is "triggered", the discard button will visible.

Task-2459645

closes odoo/odoo#66224

X-original-commit: 24804aaef12fd98bc63fdb0e7905500ac76f877a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-15 19:18:46 +00:00
Julien Giannone 8a1690dda4 [FIX] mail: (mobile) Prevent server sync for open/close state
This commit prevents the opening/closure of a channel on mobile when
the action is performed on desktop and reciprocally

closes odoo/odoo#66102

Tasks-id: 2267593
X-original-commit: a257e0ede12ead06c0f8dba90c3868761da6ea71
Related: odoo/enterprise#16323
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-12 16:22:11 +00:00
Priyanka Kakadiya f728b2d97a [FIX] mail: fix new message chatwindow issue
Current behavior before PR:
When looking for a user through the new message chat window, if there is already
a chat open for this user, the new message window is still open on selecting the
user.

Desired behavior after PR is merged:
when opening a chat from a new message, if the chat with this user is already
open then it will close the new message chat window on selecting the user.

LINKS:
PR https://github.com/odoo/odoo/pull/65851
Task-2449118

closes odoo/odoo#66085

X-original-commit: 016dedf172f750a0fcb1138a798faf2a224d513e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-12 14:52:15 +00:00
Julien Mougenot 78e44a23c9 [FIX] web,mail: Call on_attach_callback when appending content
Before this commit, the form renderer would call "on_attach_callback"
only when the whole _render process was over. The problem was that this
process is asynchronous and this callback should be invoked as soon as
the widgets are appended.

As such, any asynchronous operation is performed before appending the
content in a new function "__renderView".

Task 2346540

closes odoo/odoo#65991

X-original-commit: 953fb092636b9919aaa6c6a6cfaffd003ba951d5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-02-12 06:36:41 +00:00
Thanh Dodeur a050a069b2 [FIX] mail: prevent traceback on attachment unlink
Due to asynchronous rendering, the attachment template can be rendered
when its attachment is undefined, this was causing an issue with an
unguarded getter call that was attempting to access the attachment.

This commit fixes this issue.

opw-2457983

closes odoo/odoo#65992

X-original-commit: 33802c65c3e8d04c54de3fca5903f66b34b9d13a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-11 15:33:43 +00:00