Before this PR, the `Updating the parent message of a reply also
updates the visual of the reply` test was failing in a non-deterministic
fashion.
This PR fixes this issue by replacing the `nextTick` by a specific
`waitUntil` in order to ensure the DOM is properly updated before
asserting.
Fixes 20829 runbot issue.
closesodoo/odoo#120273
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when chatter message list was lower
than 2500px, the message-list had scrollable of 2500px
of height.
This happens because the area detecting present time was
always 2500px. thus making the content have this value as
scrollheight.
This commit fixes the issue by making presence area not
go above the conversation height. So if message list is
250px of height, then presence area is 250px, not 2500px.
closesodoo/odoo#120173
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Adds `id` in the `mail.activity`'s order to force deterministic order in
case multiple activities have the same deadline.
Not having a deterministic order can cause issue when tests check
activities' values but don't ensure they are sorted also by id.
closesodoo/odoo#120034
X-original-commit: b0a99bde8efef287f3ed89afb9da2a67233d4bd8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In commit 2ecfed335d, we made the decision
to pass the domain to the field during extracProps with a getter in dynamicInfo.
This strategy causes the domain to be evaluated for all fields using it
in their extractProps. Very often we want to evaluate the domain on
an event, for example when a m2o is clicked on. The permanent evaluation
when using the widget therefore implies an unnecessary computational cost
for the evaluation and prevents the use of field.domain as a default value,
as it may be present in readonly views which never need the domain to be evaluated.
We will therefore convert the getter domain into a function that can be
called when we need the domain to be evaluated. This allows us to avoid
unnecessary evaluations and we can use field.domain as the default value
in the dynamic.domain.
closesodoo/odoo#120061
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Open channel general
- type "#" in composer so it prompts "#general"
- delete "#"
- type "@" in composer
This happens because the partner suggestion part relies on raw server
data in model thread, `thread.channel`, which is erased from the
channel suggestion. This was used to detect whether partner is member
or not, in `thread.channel.channelMembers`.
This commit fixes the issue by making partner suggestion relies on
more reliable data in models, `thread.channelMembers`.
`thread.channel` is deprecated, and will eventually be removed.
closesodoo/odoo#119935
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
As a bonus, add cross-tab update for current user in chatter.
Part of task-3265211
closesodoo/odoo#120018
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR, link previews where not updated when a user was editing a
message.
This clear the current link previews and reprocess the updated message.
closesodoo/odoo#119917
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The opportunity is taken to clean the methods to make the override
actually possible.
Part of task-3265211
closesodoo/odoo#119942
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: web + adaptations in base, fleet, hr, hr_expense, hr_recruitment,
loyalty, lunch, mail, mass_mailing, note, project, stock, survey,
web_tour
**Foreword**
Since d19037e141 the rootnode class attribute for form/list views was
copied two times:
- on the o_view_controller div
- and on the root node of the view renderer.
Examples:
<form class="foo">...</form>
gives
<div class="o_view_controller o_form_view foo">
<div class="o_control_panel">...</div>
<div class="o_content">
<div class="foo o_form_editable ...">...</div>
</div>
</div>
and
<list class="foo">...</list>
gives
<div class="o_view_controller o_list_view foo">
<div class="o_control_panel">...</div>
<div class="o_content">
<div class="o_list_renderer foo ...">...</div>
</div>
</div>
**Issue**
This could lead to confusion and also unexpected styling issues.
See this PR #119815 to read a message JS Framework team has received.
See also another a fix that had to be made for x2m fields: 980244fa8
**Introduced Changes**
- in the form compiler, the root node attributes are no more copied to
the root div node of the compiled template the form renderer receives
- the root div node generated by the form compiler now has the
"o_form_renderer" class, which was removed during the recent form view
refactoring.
- the list renderer no more adds the root node class attribute to its
"o_list_renderer" div
- the X2ManyFieldDialog has been adapted too
- since View, X2ManyField & X2ManyFieldDialog both need to compute view
classnames derivated from the arch root node, an util has been
introduced to avoid duplicating code
- the whole codebase has been checked and adapted.
Related: odoo/enterprise#40418
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Before this commit, when accessing the discuss call settings
in non-localhost without SSL, there was the following crash:
```
"Cannot read 'enumerateDevices' of undefined"
```
Odoo uses zxing-js to detect devices within the discuss app.
zxing-js provides methods such as "hasNavigator",
"isMediaDevicesSuported" or "canEnumerateDevices" to check if
features are available. These are not called by Odoo before using
the related features what can result in a JS traceback.
This commit fixes the issue by showing a warning as a toaster
notification and in the dev tools, instead of a traceback.
The zxing-js methods are not exposed, hence the reliance on
truthy mediaDevices.
See also https://github.com/zxing-js/library/issues/225
Closes https://github.com/odoo/odoo/issues/112255
Closes https://github.com/odoo/odoo/pull/112813closesodoo/odoo#119903
X-original-commit: 32238dd680396c6ccb519aa8b3fb7487c38395f7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: mail, mass_mailing, sms, web_editor
This commit adds a new supportedOptions attribute that can be added to any
field widget metadata object. This documentation can be used from other places
(Studio for example) by getting the field from the registry and then read
this key. This attribute can contain an array, detailing the list of available
options for the field widget.
By using an array, it can be ordered easily without having an object with keys
unalphabetically. Ordering the options can make sense, especially when two
options are tied to each other, it is easier to group them one after the other.
(eg: 'start_date' first, then 'end_date')
Each option documented is an object and has the following attributes:
- help: contains more details on the current option and its use
- name: name used in the options object from the node
- label: a label with a more explicit name than the option name
- type: the type of value that must be used as a value (string, boolean, selection, field, domain)
- choices: for options with a 'selection': can be used to know available values
where multiple values can be chosen as the value. This must be
an array containing the options.
- availableTypes: for options with a 'field' selection: can be used to filter the
available fieldNames to choose as a value.
- default: the value that is used by default, when the option is not set
in the options
task-3259617
closesodoo/odoo#118713
Related: odoo/enterprise#39847
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: im_livechat, website_livechat
In preparation of splitting 'discuss' and 'mail' modules.
This allow using new folder discuss/ that contains all static
files of new module 'discuss'.
Part of task-3265211
closesodoo/odoo#119860
Related: odoo/enterprise#40388
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when receiving a new needaction message from
chatter, the messaging was not updating itself to show this new
needaction.
closesodoo/odoo#119843
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit focuses on removing all references to discuss.channel from
controllers of mail module.
In preparation of splitting discuss and mail modules.
Part of task-3265211
closesodoo/odoo#119523
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit focuses on removing all references to discuss.channel from
code located in /models of mail module.
In preparation of splitting discuss and mail modules.
Part of task-3265211
closesodoo/odoo#119413
Signed-off-by: Debondt Didier (did) <did@odoo.com>
Before this commit, when loading discuss app with
`active_id=discuss.channel_1` in URL, the discuss app did not
auto-select the conversation.
This happens because the code did not parse model and id part of
"discuss.channel_1": it split into `discuss.chann` and `l_1`,
instead of `discuss.channel` and `1`. This comes from splitting
the same way as legacy `mail.channel`, starts with 13 characters,
although there are now 16 characters in `discuss.channel`.
This commit fixes the issue by simplify the way the active thread
of discuss is deduced from active_id.
closesodoo/odoo#119559
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Enforce strict types for returned values for
* create
* write
* unlink
* default_get
to make those methods more consistent and reliable.
Also make sure they can be called with empty self/values,
i.e. that they follow the same behavior as the base methods
defined in the main orm Model.
closesodoo/odoo#116809
Related: odoo/enterprise#38880
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Clicking on an emoji from the emoji picker while holding down the Shift
key now prevents the emoji picker from closing, allowing users to easily
select multiple emoji in one go.
Task-3288704.
closesodoo/odoo#119598
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This PR complete the type definition for the props of the composer and replace
the custom Object by Ref type in the relevant place.
closesodoo/odoo#119593
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit adds two autoresize hooks for text inputs and textareas to
make it adapt their size (width for text inputs, height for textareas)
depending on their content.
The commit therefore solves the issue of several form view task titles
being restricted to 1 line while it can be annoying if the title is too
long. The autoresizeTextarea feature was moved from TextField to the
autoresizeTextarea hook and the autoresizeInput feature was moved from
the AutoresizeInput mail component to the autoresizeInput hook.
The TextField component has a new option for disabling linebreaks.
task-3138826
closesodoo/odoo#117355
Related: odoo/enterprise#39493
Signed-off-by: Géry Debongnie <ged@odoo.com>
this commit removes unnecessary modal that does not let users create
a new users from apps like crm, sale, etc. Now instead of giving requests
that lack email redirectWarning, we open user creation form where user must
set email up.
Reason behind this change is the fact that login is required at the model level,
so the manual checks for this value is not necessary anymore.
task-3262468
closesodoo/odoo#119508
X-original-commit: 7796e8ca971167a96b23baa4b57056c2007ea8b4
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
It is only used there.
In preparation of splitting discuss and mail modules.
Part of task-3265211
closesodoo/odoo#119306
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Prior to this notification actions are shown as such:
MODEL RECORD_NAME won | lost | settings
After they will be shown as such:
MODEL won lost settings RECORD_NAME
with the action links colored to match the company color.
The aim is to streamline the layout of e-mails and make actions
clearer.
task-3067315
closesodoo/odoo#106307
Related: odoo/enterprise#34284
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Many templates use the company logo that is set by default on
database creation. As that logo is clearly a placeholder and the user
isn't necesserely prompted to update it. It's possible for a user to
inadvertently start sending emails with "your logo" placeholders
plastered all over.
This removes the default logo of the company and removes it from
templates conditionally.
The logo isn't simply replaced with a transparent PNG as the templates
set a fixed height for the logo, which would look weird.
task-3067315
Part-of: odoo/odoo#106307
It is only used there.
In preparation of splitting discuss and mail modules.
Part of task-3265211
closesodoo/odoo#119302
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when adding a tag on record and then
scheduling an activity, the tag was removed from the record.
This happens because reloading the chatter does not save changes.
Although there is a `keepChanges: true` option, this looks
ineffective. This commit fixes the issue by letting chatter reload
always save any changes.
closesodoo/odoo#119275
X-original-commit: 97465dfb0ec53080bf05c3614dfa7429629729a6
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
* = bus, calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot,
mass_mailing, privacy_lookup, test_discuss_full, test_mail,
test_mail_full, website_crm_livechat, website_livechat, base
In preparation of splitting discuss and mail modules.
Part of task-3265211
closesodoo/odoo#118354
Related: odoo/upgrade#4553
Related: odoo/enterprise#39661
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, clickable of a reply-to message mistakenly
extended all the way to the other end of the conversation.
closesodoo/odoo#119228
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, content inside chat window could visually fuse
with the header in a way that makes it hard to see the separation
between the header and the content.
This commit fixes the issue by adding a small border below header
when there is some content.
closesodoo/odoo#119173
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when opening Discuss from chat window and then
accessing the settings page of a channel, the breadcrumb showed
"Unamed" as the name of the App instead of "Discuss".
This happens because the client action was not named when expanding
the chat window by opening Discuss app.
closesodoo/odoo#118939
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit,
The audio context used in media_monitoring was not
closed. Which could lead to memory leaks.
The source was not connected to the destination in the
script processor (used in old browsers that do not support
audioWorklets), which would prevent the monitored audio to be used as
an audio source.
closesodoo/odoo#119124
X-original-commit: f1c3f78dd6e17fe2a3f5a01d8510ca4343b880fe
Signed-off-by: Thanh Dodeur (tso) <tso@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
We refactor the ModelFieldSelector and ModelFieldSelectorPopover
components.
We also improve a bit ModelFieldSelectorPopover:
- on first page, the button to go back is no longer available
(so that it is now more difficult to produce an invalid path)
- we always start with a page presenting the model where the last
selected field name belongs to
- the keyboard navigation is improved
- click on model field selector opens the popover with the focus in
the search input (if any)
- for relational fields in popover: the user can either click on the
relational field (and select it) or a special button that make him
follow the relation to the field comodel
We also refactor the hook useDynamicPlaceholder to make it use a new
component DynamicPlaceholderPopover that uses ModelFieldSelectorPopover.
Task ID: 3272798
closesodoo/odoo#117951
Related: odoo/enterprise#39673
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Lot of override of read_group reimplement partially custom security
rule of `_search` method. In order to simplify these security check
and have a consistent behavior between the search and read_group method,
_read_group now use _search to create the from and where clause.
Part-of: odoo/odoo#110737
This PR hide the message body when the link preview is an image and the message
only contains the link to the image.
closesodoo/odoo#117772
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, chat window take at most 95% of global
height. This is ok in desktop, 5% room allow clicking on
systray menu. In mobile, however, the intend is for chat window
to take whole height.
This commit makes chat window take whole height in mobile, while
preserving the max-height 95% of global height in desktop.
Also fix an issue where chat window were foldable in mobile, when
this feature is desktop-only.
closesodoo/odoo#119058
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR, a link preview image would overflow out of the chat window. This
because the max-width on the image is bigger than the space dedicated to the
image inside the chat window.
This PR set the max-width to 100% inside a chat window, so the image cover the
space nicely.
closesodoo/odoo#119019
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>