Steps to reproduce:
- install sales
- create a new quotation
Previous behavior:
the avatar next to the author's name is empty in the mailthread
Current behavior:
avatar is displayed as expected
opw-2187231
closesodoo/odoo#44407
X-original-commit: 24ba9f9954a71eba46d44fe242cd2e6dba125da6
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
Follow up on 255f7219a9
The issue is still happening.
With the current commit, we will be able to know for sure if it happens because
we don't wait long enough, or because the messages are never appearing.
closesodoo/odoo#44471
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when clicking on a channel mention from a chat
window, it crashed with the following error:
`TypeError: channel.detach is not a function`
This happens due to `MailService.joinChannel()` returning a promise
that is resolved with channel ID, instead of a channel object.
`channel.detach()` becomes `<Number>.detach()`, which is treated
like `undefined()`, hence crash.
closesodoo/odoo#44329
X-original-commit: 710fda06c3b30ff2267fcc1d123f15ce031b6f3a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the CSS rule handling the "activity" of the modals
(their z-index compared to the one of their backdrop) was global and would
interfere with front-end or custom modals which do not use the static Dialog
methods giving them the "active" class.
Now, the rule has been inverted: the z-index of a modal is only changed when
it is given an "inactive" class, thus only impacting the modals instantiated
via Dialog or Owl Dialog classes.
closesodoo/odoo#44067
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In order to prepare the future, we want to convert everything in Owl.
This commit converts the activity renderer.
closesodoo/odoo#42278
Task: 2149408
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Purpose of this commit is to improve model of followers, notably management
code and its use in routes. Indeed it is quite an old model and code had
to be cleaned a bit to improve code readability and maintenance.
In this commit we
* remove unnecessary code examples in gamification about followers: using
that model as example of code for goals is probably not a good idea as it
is technical;
* rewrite routes called by JS are simplified to better match JS
implementation;
* introduce computed fields to fetch related partner or channel name,
email (partner only) and active status;
LINKS
Task 1933771
Task 2078313
closesodoo/odoo#39808
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Remy Voet <ryv@odoo.com>
Co-authored-by: jgi-odoo <jgi@odoo.com>
Co-authored-by: Xavier-Do <xdo@odoo.com>
Addition of this optional 'domain' value for systray activity related
lines allows the restriction of which activities will be included in
the view opened when the line is clicked on.
One use case is when a model is split between 2 systray activity lines.
In this case we most likely do not want the same activities of the
model to show up when we click on either line. For example, say we
have 2 modules using the same model, but the module instances of that
model are distingushed by a field.Selection value. Then we would only
want to show the activities related to each module when we click on
their appropriate systray activity lines based on that field.Selection
value.
Task: 2169498
This was incorrectly reverted during 116057b26e71db4692280463669f3e80d813ddcc
closesodoo/odoo#43564
X-original-commit: 73e3afca18fae954552d8cbecb6afddf1b08539b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Issue
- Install Time Off
- Marc Demo > Create leave request
- Admin > Validate the leave request
- Marc Demo > Add an attachment
Nothing happens
Cause
There is a access right issue that is not handled in the
JS.
Solution
Handle it by doing a do_warn.
OPW-2171791
closesodoo/odoo#43484
X-original-commit: 6a98c75ebfca694e1e68fa09eca95e47472bed92
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
When using emoji widget in a multi language environment, button for emoji
is displayed twice.
This is due to having in the widget both the input and a translation box
holding the translation button. Emoji button is incorrectly added to both
elements, which is fixed in this commit.
We also adjust vertical position so that button is aligned with the language
button.
Task #2168338closesodoo/odoo#42827
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, chatter without messages did not display
attachment counter, even though attachments could be uploaded from
attachment box.
This commit now displays the attachment counter in this case.
Task-Id 2149348
closesodoo/odoo#42672
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Steps to reproduce:
- install crm
- set your computer timezone to GMT-6 (Mexico city)
- go to crm > change the view to activity view
Current behavior:
all activities are one day off from their actual deadline
(an activity set to be due on the 7th of January shows as
6 Jan on the view)
Current behavior:
activities are displayed properly according to their due date
opw-2162579
closesodoo/odoo#43223
X-original-commit: 0735547086aaab819369b1a08e6810baeac3783d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, the test 'all messages in "Inbox" in "History"
after marked all as read' had non-deterministic failures.
More precisely, it crashed on either assertion "there should be 30
messages in History" or "there should be 40 messages in History",
both resulting to 0 messages in History instead.
Unfortunately, as of the date of this commit, we still do not
understand why it rarely fails. In the meantime, we have decided to
make these errors less likely to happen, by waiting much longer
before the assertions. We are aware that this is a poor solution,
but this is much better than skipping the test, until we find and fix
this issue at a later moment.
Closes#43072
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The test may fail non-deterministically from intercepting an
heartbeat in the local storage. Only a document thread window fold
state change from the local storage should be intercepted.
Closes#43072
Issue
- Install CRM for example
- Add 41 leads
- Create an activity on each of them
Everything ok, load more shows up
- Add another activity on one of them
Load more doesn't shows up
Cause
The uniquify method:
https://github.com/odoo/odoo/blob/saas-12.3/odoo/models.py#L4187:#L4191
Consider the second activity as a duplicate and removes it.
So, in `web_search_read`:
`len(records) <= limit` is `True` and we ignore all
the others records
Solution
Add `force_search_count` in the context when using this action
to avoid uniquify to falsify the records length.
I added the tree view for this action too. It improves UX.
OPW-2165455
closesodoo/odoo#43149
X-original-commit: 13ec3503fbfb5d3d2b1e824059737bd866a3a9f4
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
Before this commit, opening the messaging menu might be slow.
This was caused by the parsing of bodies of messages with lots of
HTML nodes. Indeed, the body of a message is linkified and inlined,
and both processes were quite slow due to their implementation: each
node in the HTML were recursively parsed and re-assigning
`innerHTML`. As a result, each node was triggering an HTML parse,
which is very slow on complex nodes.
This commit fixes this performance issue by speeding up inlining and
linkifying of html strings. In the case of linkify, it now triggers
an HTML parse only when necessary, while inlining now relies on its
textContent value.
These changes should drastically improve the speed of opening and
rendering messaging menu, almost ten times faster.
Task-Id 2076299
closesodoo/odoo#42949
X-original-commit: 8db0afb50ce0853a6a8ab7ee11dd5ed876abab64
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Of the rename conversation dialog
closesodoo/odoo#42630
X-original-commit: f9479456c0924c12c098edaebc2013418c09590c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit, when "Send message" composer was open with some
suggested recipients, and then editing and saving data related to
the suggested recipients, the suggested recipients were not updated
on composer until some user interactions like page reload.
Steps to reproduce:
- Open an opportunity in CRM;
- Open "Send message" composer;
- Change "Email" field;
- Save changes;
> Suggested recipient above composer textarea is not updated with
newly saved email adress.
It becomes updated only after some user interactions, such as toggle
"Log note" then "Send message" or with a page reload.
This commit fixes the issue by updating the suggested recipients on
the composer in real-time when clicking on "Save".
Task-Id 2089816
closesodoo/odoo#40033
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
PURPOSE
Allow to use the text field with integrated emojis support in other apps
notably mass mailing
SPECIFICATIONS
In this commit we somehow clean code related to emojis widgets
* simplify some code bits;
* update comments;
* add an option on the emojis widget to trigger ``onchange`` on a ``keydown``
event;
LINKS
Task #2117238
PR #40045
Enterprise PR odoo/enterprise#6630
PURPOSE
Allow to use the text field with integrated emojis support in other apps
notably mass mailing
SPECIFICATIONS
Currently there is one emojis enabled widget which is based on text widget.
It is therefore limited to ``<textarea/>``.
In this commit we propose to support emojis in char fields, aka using an
``<input/>``.
We therefore move most of the code within a ``FieldEmojiCommon`` and then
creates two widgets based on it
* ``text_emojis`` inherits from ``FieldText``
* ``char_emojis`` inherits from ``FieldChar``
LINKS
Task #2117238
PR #40045
Enterprise PR odoo/enterprise#6630
PURPOSE
Allow to use the text field with integrated emojis support in other apps
notably mass mailing
SPECIFICATIONS
Move emojis mixin and FieldTextEmojis field definition from social to mail
application. Rename emojis namespace accordingly.
LINKS
Task #2117238
PR #40045
Enterprise PR odoo/enterprise#6630
Timer test relies on setTimeout(..., 0) for its execution and its
verification. However it seems that in the browser there is *not always*
a guarantee that 2 setTimeout(...,0) will execute in a specific order.
Delaying the verification by 1 ms : setTimeout(..., 1) should force the
order of execution.
closesodoo/odoo#41732
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
This reverts commit e5479fcfdb.
This commit prevented an issue of losing messages on post in case
of connectivity loss. The implementation consists of keeping the
content in the composer until the server acknowledges handling the
message.
However, this solution introduces significant issues. For instance,
sending messages in quick succession will likely loose or duplicate
some content, based on how fast/slow the RPC `message_post` is
resolved. Plus, there was an issue on mobile because the input focus
was lost during the RPC. As a consequence, the virtual keyboard
flickered.
The intent was to fix a rare issue, and since the problems of this
solution clearly outweigh the gain, we decided to revert.
closesodoo/odoo#41544
X-original-commit: 36b2e99e08bfc6d92a821d0346e783695580abf9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when navigating from test environment (e.g.
page reload), it crashed with following error:
`TypeError: Cannot convert undefined or null to object`
This error comes from mocked bus services in tests: even when they
have been destroyed, they handle the window event 'unload'. They
no longer have a parented parent, so `this.call()` returns
`undefined`, hence the crash.
This commit prevents mocked bus services to listen on window 'unload'
event. Tests must always simulate this window event by explicitly
calling the handler.
closesodoo/odoo#41378
X-original-commit: fd08d04f0a24fea52e7b668b90aec48b33d349a3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
PURPOSE
Clean posting process and improve mail.message definition and comprehension.
SPECIFICATIONS
In order to be more explicit subtype parameter is renamed to subtype_xmlid.
It therefore clearly indicates it should be a valid subtype Xml ID. Support
of ill formatted Xml IDs is removed because there is no reason to try to
add some random prefix. Give something that exists or go to hell, punk !
LINKS
Task ID 2071556
PR #38692
Currently when you open, for example, 5 chat windows on the desktop,
each of those windows will be opened on mobile as well.
The big issue with that is that I have to shut down all windows before
starting to work on the application.
To make things simple, you have to explicitly open chat window to
make it appears on mobile. Synchronization is blocked in both direction.
We don't update the chat window state on the server and we no longer
consider notifications (bus) about it.
Tests were added in enterprise.
Task ID: 1891952
closesodoo/odoo#41052
Related: odoo/enterprise#6943
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit adds the out-of-office ribbon at the top of the
conversation in the discuss app.
Task-2066672
closesodoo/odoo#39362
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
If the user put more than 200 emojis, we didn't replace emoji with
image. But due to a typo in the code, this mechanism broke the
discuss application.
closesodoo/odoo#40734
X-original-commit: 0877cb6c84c768bd9fad46fa6f959635bb2353a5
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In discuss, make a search with some stuff, and try to save
that filter as favorite
Before this commit, there was a crash, because the Discuss action
did not implement what the controllers do to save favorites.
After this commit, it is possible to save a filter as favorite
OPW 2087258
closesodoo/odoo#39519
X-original-commit: 5514a414324675bf5c2cc0360e429a7d2548b16f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Revision on https://github.com/odoo/odoo/commit/9a66619db33fca5f0cb81d9f6bfeb0fb0290cf68
Commit above improves the web client startup by not having to wait
for discuss widgets to fully load beforehand.
However, it introduced an issue with chatter when the 1st rendering
happens before messaging becomes ready: it displays
"Creating a record..." instead of the whole history of messages.
This happens because when messaging is ready, it updates data from
the chatter but it does not trigger a re-render.
This commit fixes the issue by triggering a re-render on messaging
ready. When messaging is not ready, thread field now displays
"Loading..." instead of the message "Creating a record...".
Task-Id 2078193
closesodoo/odoo#38751
X-original-commit: 93bdd7c91095025f4d6e7a058e0ab1c4e1a0ad60
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when clicking on "Unstar All" from Discuss
'Starred' mailbox, it crashes with following error:
```
TypeError: unstar_all() takes 1 positional argument but 2 were given
```
This commit fixes this issue
closes#37994closesodoo/odoo#38738
X-original-commit: ec330d1668640d3ae75e23a70695006a63dbe217
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Revision on https://github.com/odoo/odoo/commit/e7aff236b8073b952a0e554d9897a8f88d5c4c91
Commit above remove cross icon on attachments from messages that are
not in the chatter, since this only makes sense in the chatter.
However, it also removed by mistake the possibility to delete
attachments from the attachment box in the chatter.
This happens because the template of attachments uses a newly
introduced contextual boolean `isDeletable`, and this is false by
default due to undefined being falsy.
This commit fixes the issue by explicitly enabling deletion of
attachments from the attachment box.
Task-Id 2081987
closes#38003
X-original-commit: 1a175686d493d9f289cf391b65a56adc80da82c2
Go to hr.applicant view form, Edit and change something.
Each time you change a field, the Attachment box in the chatter is toggled
(as if you were clicking on the small attachment button each time).
This a wrong behavior of the `open_attachments` option of the `mail_thread`
widget.
Opening the attachment box should be done at the widget initialisation,
not at every render.
closesodoo/odoo#38720
X-original-commit: 400a1f7bc3d00f5bc95bdbfe1dfadf9d251d808b
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
After commit ef46378, the position of the composer tools of the chatter
was below the text area instead of at the right of it. This is because
one div inside the flexbox was no longer diplayed as a flex or absolute.
By setting that disabled textbox to position absolute, the flexbox can
be displayed normaly again.
closesodoo/odoo#38183
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the displayed images with 'o_mail_preview_image'
class were not correctly displayed (some icon were distorted).
Note that this is a minor issue that was already present on older versions.
closesodoo/odoo#37161
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before this commit, the url for the src of the iFrame used
to display text files in the document viewer wasn't properly set,
resulting in the `model` argument to be invalid.
This commit fixes this issue.
Task-Id 2058588
closesodoo/odoo#36160
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since 1d766c067d the attachment icon was
missing when it wasn't a pdf or image type file.
opw-2064128
closesodoo/odoo#37687
X-original-commit: c44cec7e5ed9de3be495eb44b351eda6b0f6aeee
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
These functions convert plain text links into clickable hyperlinks.
These open in new tabs but did not have the "noreferrer noopener" rel
attributes, which made them susceptible to reverse tabnabbing.
A lot of attack vectors were available to unregistered, uninvited
anonymous users and presented a significant phishing threat (such as
posting links in the instant-chat, through a mail-alias, in a forum post
or in a twitter post) and leading the operator to believe he had been
disconnected from odoo in the original tab, prompting them to enter
their credentials.
while these three places will add the noreferrer and noopener attributes
on the anchor tags generated by them, there are still many places that
create hyperlinks without the use of these functions, although most of
them are static links, they still represent a transitive security
vulnerability to the linked sites.
There are also a few modules and widgets that roll out their own links
or open new tabs unsafely using window.open(), these will need to be
patched separately.
closesodoo/odoo#37591
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>