task #3356870
Before this fix, at the first time of sending message in a chat, the tempId of the message in the chatter, crashes the getting lastMessageId and the first tempId in the chat becomes NaN.
closesodoo/odoo#125424
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: account, crm, crm_iap_mine, event, hr_expense, hr_holidays,
hr_recruitment, lunch, mail, mass_mailing, point_of_sale, project,
purchase, purchase_stock, sale, survey, web, website, website_blog,
website_event, website_forum, website_sale, website_slides,
test_main_flows
In odoo/odoo#111103 the tour system was rewritten. The previous tour
system used to depend on the `root.widget` js module, and this module
was an async module that indirectly depended on `session_bind` which
would load the translations, meaning that the js module definition code
of the tours would only run after the translations were loaded. This is
no longer the case with the new tour system, this means that the module
definition code is executed as soon as the dependencies of that module
are fulfilled, which is generally befoe the translations are loaded,
causing most tour tips to not be translated.
This commit adds a hacky workaround for this problem: it creates a new
module that has a default export which is a promise, and has a legacy
alias, this creates an async module that waits for the translations to
be loaded. This module is then imported for its side-effect in all
onboarding tours, causing them to be translated correctly once again.
This commit also needs to convert the steps key in the tours internal
registry to a getter. In previous versions, the steps were directly
added as is to the internal state of the tour service, but since
odoo/odoo#122834 the steps are now mapped, and without a getter, any
edits to the steps occurring after registration will not be taken into
account. This causes issues in some modules that change original
behaviour of other modules (eg accounting makes invoices into a menu in
the accounting app instead of a top-level app in the home menu) as they
need to edit the steps of existing tours to make them work.
In a separate PR, we will implement a more proper fix by changing the
API of the tour manager so that we no longer need this workaround.
closesodoo/odoo#125284
X-original-commit: d130699ba82dc9919c9116f4b64a5e461ebb6319
Related: odoo/enterprise#42655
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This results in parent message being displayed as text when it is part
of the result of a load around call.
closesodoo/odoo#125439
X-original-commit: 783a5186cf7529161d95c34c9290dc57a32b8200
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Forgot to properly sort messages, resulting in returning messages not
actually around but the most recent instead.
X-original-commit: 803f1ad7e3bceaa8f03fca06f920447ce9d8eb69
Part-of: odoo/odoo#125439
Double assignation does not chain, resulting in the non proxified
message being returned, which can potentially cause issues either when
comparing messages by reference or if a reactive version is expected.
X-original-commit: 30a77cb2778ec0fce5892cfd3903aa1982825626
Part-of: odoo/odoo#125439
Small mistake during forward-port of [1],
`btn-link` was moved from `t-att-class` to `class`.
The `btn-link` visual is specific to non-chatter, therefore
it should be in `t-att-class`.
[1] https://github.com/odoo/odoo/pull/124905closesodoo/odoo#125395
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, push notificiation content
was not displayed correct.
When receiving message `<`, it shows `<`.
This commit fixes the issue by not unescaping the content.
closesodoo/odoo#125314
X-original-commit: 4f8ba016e63cb9817d61705ce262d392f7704ef5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit:
In discuss when a user receives a message containing strings from any of
these '>,<,&' it gets converted to `>,<,&` respectively.
For example, if a user sends '<abc>' , when the chat is out of focus,
the toaster notification will show a notification with an escaped message
i.e.`<abc>`.
After this commit:
The message will be shown as it is, in the toaster notification.
Task-3284244
closesodoo/odoo#125306
X-original-commit: bbc9966198eb644c220d98452e0ef53c8424f5ea
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When odoo tab is out-of-focus and user receives a new message,
it should play a sound effect. This works when showing notification
in Odoo, but when push notifications were enabled it did not play
the audio.
This commit fixes the issue by playing audio when receiving push
notification of new message while out-of-focusing the tab.
closesodoo/odoo#125305
X-original-commit: b0b4f300705595df31588e747e1b12ad99f6d8d0
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since [1] thread actions are stored in a specific registry.
Some of those actions require props to be passed to their
component.
Those props are not correctly passed as the `componentProps`
key is in fact a function that returns the props but is
treated as the props themselves.
This commit fixes this issue by transforming `componentProps`
into a getter, so that `action` is internally passed to
`componentProps` definition. The templates using thread
actions can still use `t-props="componentProps"` as getter,
as the active action is deduced by transform automatically.
[1]: odoo#123454
closesodoo/odoo#125120
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, the seen indicator in squashed messages was
not centered. This is especially noticeable in comparison to
shorten date when hovering on this squashed message in chat window.
This commit centers the sidebar in squashed messages.
closesodoo/odoo#125082
X-original-commit: 1c342c1c5c14add563bba07fe5e5b6e6fbe9fdb3
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when posting a message in discuss with some
urls, the url was not linkified.
Example of such linkify not working:
```
https://www.45017478-master-all.runbot134.odoo.com/web
```
The url regexp was changed with [1]
to make punctuation mark the end of url to linkify. The 1st dot
removed in diff was a mistake. This commit reverts this part, so
that url above is correctly linkified while fixing the problem
of [1].
[1] https://github.com/odoo/odoo/pull/122621closesodoo/odoo#125081
X-original-commit: bbbc85865b45615937a22ed08b6e560a0aa898a0
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
- Send button has text "Send" or "Log" depending on composer mode
- When button is active, it has `btn-primary` and composer mode
buttons use `btn-outline-primary`
- Add hint to use Send keyboard shortcut for fast send in chatter
Other changes:
- Re-introduce missing feature to jump to present when posting
a new message in a thread.
- In chatter, the topbar and composer are sticky. Whole chatter
is scrollable rather than just a part of it. As a result,
`Chatter-scrollable` becomes `Chatter-content`.
- Editing a message in chatter now uses the extended composer
Task-3356271
closesodoo/odoo#124905
X-original-commit: 894ec7e7757d2bb78574e8cd210012b83fad1cf6
Related: odoo/enterprise#42508
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit fixes the display of the ColumnProgress component, which was
no longer displaying an animation when a filter is applied. This was due
to changes made in commit (1), introducing an "activeBar" key on the
value given to the ColumnProgress component.
A test has been modified to assert that the classes corresponding to the
animation are added as expected when a filter is selected.
1) 58ca40b032closesodoo/odoo#124969
X-original-commit: b4857a5c4570d3824b581003cdf456bcdc29f75f
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
On the welcome page, in the join channel button, the arrow icon is not centered.
Technical reason:
Currently, fa-stack class is used with the oi class, that results in the
misalignment of the arrow icon, which prevents it from being centered.
After this commit icon will be centered.
Task-3355356
closesodoo/odoo#124910
X-original-commit: 60b0155ee17e74f7eadfa02c635b8b617c451be4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Steps to reproduce:
- Create a chatbot
- Browse your website as a user in moble
- Start a conversation with your chatbot
- Go back to your website or close the window
There was a crash because some code in chat window service
makes sense only in `/web`.
Task-3367338
closesodoo/odoo#124716
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, a new unread message could contribute to unread
counter of conversation twice.
Steps to reproduce:
1. Log in as Demo and start a conversation with Mitchell Admin
2. Log in as Admin: if this is the first message in the conversation,
counter is correct and shows (1)
3. Log out as Admin
4. Send another message to Admin
5. Log in as Admin and notice that the counter is doubled
6. If the conversation was still open, counter is correct!
This happens because some notification are pending dispatch before
fetching messaging state initially. The counter at init_messaging
fetch takes into account the notification. However, when handling
the message notifcation, it's wrongly considered as a new
notification, thus incrementing the counter when it shouldn't.
This commit fixes the issue by fetching the last bus notification
when fetching init_messaging. Doing so allow to determine whether
a notification is newer or older than init_messaging state.
This helps deciding whether the counter should be incremented or not.
Task-3357960
closesodoo/odoo#124767
X-original-commit: 081ab772dece86f1b5a5d4b3f6227b4b311d9206
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Before this commit, a `t` opening and closing tag mismatched.
This would lead to an error when exporting the discuss app
translations.
```
Traceback (most recent call last):
File "/home/odoo/Desktop/odoo/odoo/odoo/tools/translate.py", line 1152, in _babel_extract_terms
for extracted in extract.extract(extract_method, src_file, keywords=extract_keywords, options=options):
File "/home/odoo/.local/lib/python3.8/site-packages/babel/messages/extract.py", line 322, in extract
results = func(fileobj, keywords.keys(), comment_tags,
File "/home/odoo/Desktop/odoo/odoo/odoo/tools/translate.py", line 905, in babel_extract_qweb
tree = etree.parse(fileobj)
File "src/lxml/etree.pyx", line 3521, in lxml.etree.parse
File "src/lxml/parser.pxi", line 1880, in lxml.etree._parseDocument
File "src/lxml/parser.pxi", line 1900, in lxml.etree._parseFilelikeDocument
File "src/lxml/parser.pxi", line 1795, in lxml.etree._parseDocFromFilelike
File "src/lxml/parser.pxi", line 1201, in lxml.etree._BaseParser._parseDocFromFilelike
File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
File "/home/odoo/Desktop/odoo/odoo/addons/mail/static/src/emoji_picker/emoji_picker.xml", line 60
lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: t line 10 and div, line 60, column 15
```
closesodoo/odoo#124751
X-original-commit: eb59c0157cbe2d5d82356333b0e35a5f9513524d
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Otherwise it makes whole chatter overflow on the right.
closesodoo/odoo#124618
X-original-commit: 61f47dfe74fa65fa55aa68c4a9676362511dc478
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In [1] the order by `id ASC` has been removed from the
`_message_fetch` method. This is wrong since we want
to load the messages coming DIRECTLY after the given
id thus, this order is required.
In order to solve this issue, this commit ensures the
order of the messages returned by the `_message_fetch`
method is always in descending order as it was done
implicitly before [2].
[1]: https://github.com/odoo/odoo/pull/123664
[2]: https://github.com/odoo/odoo/pull/116666
task-3349175
closesodoo/odoo#124169
X-original-commit: 074a5fea5a7f08c7018620cb9b2b956b3a871344
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Avatar didn't sync when changed due to miss reading the cache key.
Part of task-3265211
closesodoo/odoo#124466
X-original-commit: 58fea4c78e11176bac609f89476fec8cd9fdb5df
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
How to reproduce the bug
========================
-> Try to preview some documents like (Employement Contract.pdf or Odoo CLA.pdf).
-> Preview is broken.
Technical
=========
"application/pdf;base64" mimetype was not included in the isPdf() so the
method was returning the false value.
After this commit:
==================
Now the PDF containing this mimetype are previewable.
Task-3305415
closesodoo/odoo#124412
X-original-commit: 698d51fa56be47eb108cec299b12a3f6b58058b9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Remove "fake" feature sub-folders that make files harder to find.
Note: If there are too many files in the main folder now, a new split
that actually makes sense can be done at a later time: this would not
just be code move, but removing coupling between said feature and the
rest of the code.
Apply consistent structure, where the top level folder is a feature (or
core), and sub-folders are subdivision of the feature depending on
context (closely related to assets bundles).
```
- core
- common
- public
- web
- feature
- common
- public
- web
```
The opportunity is taken to reorganize the top of the files and imports:
- Always use absolute path in imports to be able to find all usages of a
file with a single search.
- Reorganize imports to group them by module, and to sort them
alphabetically by path/feature.
- Always use single asterisk (*) for `odoo-module`: less characters yay!
And double asterisk should be used for JSDoc comments, not for custom
instructions.
Part of task-3265211
closesodoo/odoo#124168
Related: odoo/enterprise#42121
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit fixes issues that could happen when a groupBy is present
in the load params from the ActivityModel. Before the rewrite of the
view to Owl, this code was present but was forgotten. This causes
crashes whenever web_search_read is then called, leading to undefined
record in the template, and crashing the view.
Now, the groupBy param (if present) is replaced by an empty array.
A test has been added to verify that during the load, even if the
ActivityModel has received a groupBy in its load parameters.
closesodoo/odoo#124215
X-original-commit: b6fa8ec174f5467baaed32b0c12acd0224757281
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
Following https://github.com/odoo/odoo/pull/123266 that removes
some vertical spacing between messages.
The date text on squashed messages was increasing size of messages
that fits on a single line.
This commit fixes the issue by slightly reducing the size of date
text in sidebar, so that when hovering messages it doesn't affect
the size of messages.
closesodoo/odoo#123799
X-original-commit: 454d250e6c88b09d616d4d3404204d57addf8b28
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when hr was installed and Demo clicks on avatar
of Mitchell Admin, open chat failed due to access right exception.
This happens because open chat works only with internal users, and
when we don't know whether the partner has an internal user, we have
to check whether there's a user linked to this partner.
Doing `searchRead()` without passing any field triggers this missing
access right for some reasons.
Only the knowledge of an existing `userId` is enough, so we
can actually just make a `search()` to get the user id. This won't
trigger the access right exception while giving the user id of
the partner if this exists, thus proceeding with open chat request.
closesodoo/odoo#123796
X-original-commit: 2f6dc5f4222d380cf77c6660ccce8b7381e0e64a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This will remove the necessity to patch component, and remove
duplciation between discuss and chat window.
Part of task-3265211
closesodoo/odoo#123454
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>