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
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
closesodoo/odoo#70445
X-original-commit: 338b84bd9d2d675af30ab19c6bb262d2f68546b9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#70334
X-original-commit: 2b3ad9bfa9459b8e39d769afa8fa61ceef925c75
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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.
closesodoo/odoo#70251
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#70204
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
It was the last remaining usage of the deprecated `_updateAfter` which is
therefore removed too.
Part of task-2258617
closesodoo/odoo#70170
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#69830
Related: odoo/enterprise#17936
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#69755
X-original-commit: 08f152bb9ceb6bd4560aa177b392b0420162e131
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#66889
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#68430
X-original-commit: 63b15e23d95b310a12bdbc30c983081ed84187a3
Related: odoo/enterprise#17335
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#68428
X-original-commit: 2208a9b5e18881f5fbfea56872990daafba45579
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
PURPOSE:
Currently typing status is sent when typing a command.
SPECIFICATION:
Typing status should not be sent when typing a command.
Task-2363267
closesodoo/odoo#68424
X-original-commit: 7f28e68776849993f16b4b27e6213c0cce67de37
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#61570
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/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>
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
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
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
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
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
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
closesodoo/odoo#67889
X-original-commit: 4445207161c84d2854055df63013c1361e5d4697
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#67724
X-original-commit: 2542f731c5b06c3b451ecde7992d3bb45adb2c60
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#63000closesodoo/odoo#67549
X-original-commit: 51e962803d2048efeb0f7e96a9fe561ac49ee05a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
* 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
Some characters were not rendered properly, this commit restores the display
as it was in v13.0.
closesodoo/odoo#67095
X-original-commit: 9c8286b8a6fb376aa21b833cb35da044d2eb0e23
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#67063
X-original-commit: 72e96af8dc392796d4e45b96784e7ac50d660127
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#66432
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
* 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.
closesodoo/odoo#65967
Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
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
closesodoo/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>
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/65600closesodoo/odoo#66838
X-original-commit: 699672a0ff474f4550d92657ab22f9c92c7b3b42
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#66828
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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.
closesodoo/odoo#66683
X-original-commit: e0ae3c6270467985a4d56c902ef109ffc5513b13
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The executing function for FieldCommand should return boolean value
to indicate whether the value changed for triggering the re-computation.
closesodoo/odoo#66681
X-original-commit: a3f5d0b292361a4aa3af8e7662f74150c5d85254
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#66400
X-original-commit: ff44dbf31a3732a8ebced7ff907fff3b2440afc4
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#66280
X-original-commit: 1de3ce47c6ab1a7afaccfda086a6284c0c41dcf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#66224
X-original-commit: 24804aaef12fd98bc63fdb0e7905500ac76f877a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit prevents the opening/closure of a channel on mobile when
the action is performed on desktop and reciprocally
closesodoo/odoo#66102
Tasks-id: 2267593
X-original-commit: a257e0ede12ead06c0f8dba90c3868761da6ea71
Related: odoo/enterprise#16323
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#66085
X-original-commit: 016dedf172f750a0fcb1138a798faf2a224d513e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#65991
X-original-commit: 953fb092636b9919aaa6c6a6cfaffd003ba951d5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/odoo#65992
X-original-commit: 33802c65c3e8d04c54de3fca5903f66b34b9d13a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>