Before this commit, when content of dialog was long, content
overflow but was not scrollable, which makes bottom unreachable,
which is especially a problem when buttons are at the bottom.
This problem solves the issue by adding classname `modal` to
dialog. This classname puts proper handling of overflow of
dialog and its content.
Also remove `align-items-center` so that top doesn't overflow
in isolation from the rest of content, which made top unreachable.
Task-2973866
closesodoo/odoo#99865
X-original-commit: 9f4495aa065da5e94d6ccd007c9f26b7d755f140
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, when searching an emoji in emoji picker,
the last row was frequently now showing. This is especially
a problem with very specific search, whose results are not
showing any result, like "bomb" for 💣
This commit fixes the issue by properly showing the last row.
Task-2976677
closesodoo/odoo#99766
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since the PR introducing the wowl environment in the discuss app, the
model manager is not set in debug mode during tests. The debug mode
is usefull since it adds integrity checks and more verbose error
messages. This commit restores it.
closesodoo/odoo#99556
Related: odoo/enterprise#31086
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
- Made executeGracefully in messaging so it can have specific
behaviour in qunit tests (no timeout)
- guard all usages of `executeGracefully` in case current record
is deleted (e.g. during test teardown).
Task-2976295
Part-of: odoo/odoo#99556
This computed field was manually updating a field, which is
not correct. Instead, this field should have been an `onChange`,
which is what this commit does as a fix.
Task-2976940
Part-of: odoo/odoo#99556
1. Remove emoji that have unicode version equal or greater than 13.0.
2. Also removes "smiling_face" and "frowning_face" emojis, as although
they are old emojis, their visual support is quite lacking, so
they feel off. As substition, use "slightly_smiling_face" and
"slightly_frowning_face" respectively.
3. All regional flags have been removed.
4. the 11 remaining flags have been moved to "Symbols" category.
Task-2976577
closesodoo/odoo#99753
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since we are not using `postMessage` in `updateMessage`, setting
isPostingMessage is not useful.
closesodoo/odoo#99744
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
When creating records with default keys in context those are currently
propagated through the whole call chain until message creation. However
default keys are meant to be used for the record creation, not its logs
or messages.
A protection against default_child_ids already exists. However better
remove all context keys by using a clean context.
Closesodoo/odoo#93797closesodoo/odoo#99670
X-original-commit: 421ee12a099220cb43f3c3f0bf8d51586e687a28
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In preparation of future clean up.
- remove obsolete method _fetchSpecialActivity
- apply lint / some es6 syntax on legacy activity file
- use async/await and remove most self in legacy activity
- inline activity setFileUploadID function
- inline activity _bindOnUploadAction function
- inline activity setDelayLabel function
- inline activity _readActivities function
- inline activity _sendActivityFeedback function
- inline activity _bindPopoverFocusout function
- remove obsolete activity _unbindOnUploadAction function
closesodoo/odoo#99646
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, the `remove an attachment..does not need any confirmation`
test would fail because the attachment was deleted while still
uploading. Since the abort controller does not work in the mock
server, the attachment would have finished its upload after its
deletion. This commit solves this issue by waiting for the attachment
to be uploaded before deleting it.
closesodoo/odoo#99758
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The chatter drop attachment test fails in an indeterministic manner.
This is because we're assuming that the next render will be the one
corresponding to the file uploading. In order to be sure this render
is really the one we're expecting, the `o-file-uploader-upload` event
is added.
closesodoo/odoo#99652
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Improvements:
- Much more emojis in the emoji picker (more than 1800 emojis, up from 81)
- Fuzzy search bar to find emoji in the emoji picker
Known limitations:
- Emoji visual is based on browser/OS, so some emojis may not be visible on some devices
Task-2957928
closesodoo/odoo#99343
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Returning after first loop iteration has the sad side effect of
somehow breaking batch version of methods.
Oversight of odoo/odoo@0ea27f430cclosesodoo/odoo#99630
X-original-commit: 6d6dbe16d4570372fe5fd3d28ebe5c43b646d3bc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This PR fix a traceback that occure when the message body is empty (eg: only
uploading an attachment).
closesodoo/odoo#99625
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The `waitUntilEvent` start helper parameter has become obsolete. Indeed,
events are systematically awaited by the `openDiscuss`/`openView`
helpers. This commit removes this parameter.
closesodoo/odoo#99577
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: im_livechat, website_livechat
Access right should be based on channel type and membership instead.
Chat always private, group always private, channel private should
disapear and be a group instead (migration needed), and other channel
always public (but they can still be further restricted with
the "allowed groups" feature)
task-2632861
closesodoo/odoo#90415
Related: odoo/enterprise#30980
Related: odoo/upgrade#3850
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR, some mail tests relying on DOM elements being present
but that are added after the messaging initialization could fail
unpredictability. This commit fixes this issue by waiting the next
render following the initialization of messaging.
closesodoo/odoo#99461
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit implements the blur feature to the user-video (=not screen
sharing) during video calls using google's MediaPipe library*.
* https://google.github.io/mediapipe/
task-2818116
closesodoo/odoo#94982
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: base, mrp_account, product, mail, website_blog, website_event,
website_forum
This commit improves the button that allows to go to the backend view of
an object when you are on its corresponding page on the website. The
button is more visible and the user can see which object he is going to
edit. Note that this commit also:
- Changes the access key to translate a website page to ALT + T.
- Adds a new access key to edit an object in backend with ALT + E.
- Removes the possibility to duplicate a blog post (but this feature
will be reintroduced later for all models, generically) **.
**: Note that the duplication of blog posts actually had a mistake:
The controller to create a new blog post has been added with [1] where
it has been decided to not be a follower of the blog posts at their
creation. A new controller has been added by [2] to be able to duplicate
a blog post, to be consistent with [1], here also the user does not
become a follower of the new blog post (the copy). So far, so good.
Finally, [3] has changed the blog post creation controller so that the
user who creates the blog post is a follower of the new blog post.
Unfortunately the same change was not made for the duplicate controller,
which is a mistake. There is no reason to be a follower of the newly
created blog posts when you go through the add blog post controller but
not when you go through the duplication controller. The behaviors should
be consistent and there is no reason for there to be a difference.
[1]: https://github.com/odoo/odoo/commit/4c3b516a7b988d758a67ff19242e8ed0837d756c
[2]: https://github.com/odoo/odoo/commit/fe40538aff2b65f7719840c8e2d6e51e858f560f
[3]: https://github.com/odoo/odoo/commit/4bf9dc4078a5ca413539a6fd16400fd5aad46907
task-2889929
closesodoo/odoo#97353
Related: odoo/enterprise#30075
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
This commit allows compute and sort functions to be declared within a
field definition instead of providing a string with the name of the
record method to be used to compute/sort the field value.
Example of code with compute inline:
```javascript
registerModel({
fields: {
thread: one('Thread', {
compute() {
return {
id: this.id,
model: 'mail'.thread',
};
},
}),
},
});
```
Example of code WITHOUT:
```javascript
registerModel({
recordMethods: {
_computeThread() {
return {
id: this.id,
model: 'mail.channel',
};
},
},
fields: {
thread: one('Thread, {
compute: '_computeThread',
}),
},
});
```
The aim of these changes is to empower a better separation of concerns,
by allowing to group together in one place the data related to a field.
Note that for technical reason (`Function.prototype.call` not working as
expected with arrow functions), compute/sort functions should not be
arrow functions.
closesodoo/odoo#99424
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, since https://github.com/odoo/odoo/pull/96954 ,
the `CallActionListView` had its `channel` field renamed into `thread`.
A reference to this old field name was missed which caused the
traceback, this commit fixes this issue by using the right field name.
closesodoo/odoo#99447
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
* = bus, hr_holidays, test_discuss_full
- use channel member instead of partner for typing
- use channel member instead of partner for all other return values from server
- remove temporary partner hack in livechat and keep public partner
- remove some obsolete convert data
- adapt format methods accordingly
task-2664853
closesodoo/odoo#98923
Related: odoo/enterprise#30760
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Prior to this commit, the space between messages where too large and
created inconsistencies.
This commit fixes this issue.
closesodoo/odoo#99396
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, we were using `bg-secondary` which was dependent on
whether we used community or enterprise style, and `bg-black-75` which
is legacy and not available on the discuss guest page.
This commit fixes this issue to make the colors consistent across those
cases.
closesodoo/odoo#99393
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The goal is to improve the dates utility functions (parse/format) by removing the timezone option, which is difficult to understand and has proven to be error prone.
- Rationale
When manipulating DateTime objects on the JS side, associated timezones
must be always coherent.
Until now, there were several code parts that had to check the DateTime
timezone and handle things differently in a case or another.
This sometimes lead to wrong code.
E.g. there was a bug in the DatePicker component because the DateTime
object it receives in props is in local timezone, but once it updates it
through the parse utility, the new object is in UTC.
- After this commit
The DateTime objects you'll get through deserialization or parsing are
always set in the user's local timezone.
The formatted strings you'll get through formatDate and formatDateTime
utils will always be expressed in the user's local timezone.
The formatted strings you'll get through serialization utils will always
be expressed in UTC.
- serializeDate and serializeDateTime
- expected input: a DateTime object (its timezone does not matter)
- outputs: a string formatted for the server expressed in UTC
- formatDate and formatDateTime
- expected input: a DateTime object (its timezone does not matter)
- outputs: a string formatted for the user, expressed in the user's TZ
- deserializeDate and deserializeDateTime
- expected input: a date(time) string provided by the server, in UTC
- outputs: a DateTime object in user's TZ
- parseDate and parseDateTime
- expected input: a date(time) string provided by the user, in its TZ
- outputs: a DateTime object in user's TZ
- Other changes in this commit
As the timezone option has been removed from parsing/formatting utils,
all their usage had been adapted in the codebase.
The large diff in dates_tests.js is because some tests were reorganized,
others were removed/adapted/joined.
A test has been removed from daterange_field_tests.js, because it has
no sense: it displays a date field as a datetime, but a date field does
not have any time information.
Part-of: odoo/odoo#98980
Co-authored-by: Julien Mougenot <jum@odoo.com>
Prevent archiving in-use mail servers by displaying an error message that
lists where it is still used, allowing to easily identify what need to be
updated before being able to archive the mail server.
Additionally,
- prevent the use of archived server as a fall-safe
- when duplicating a mailing with an archived mail server, replace mail
server by the default one
Detailed explanation:
1. A check has been added that raise an exception when trying to connect to the
smtp server or send an email when the server is archived.
With that solution,
- testing the connection of an archived server displays an error telling that
an archived server cannot be used.
- if a mail is still sent with an archived server, mail are in error :
"Connection failed (outgoing mail server problem)"
This fail-safe ensures that no mail will be sent through an archived mail server
and that the user will get some feedback about it.
The same fail-safe for the incoming mail server has been added.
Notes:
- the connection will outlive the archiving of a mail server still allowing
to send email through the archived server until the connection is closed. But
connection are not kept for long so this shouldn't be a problem.
- it cannot be tested because the connect method return immediately in test
mode.
2. When a mail server is archived, an user error is raised if it is in-use.
The implementation relies on each module to override the method
"_active_usages_compute" in "ir_mail_server" to complete the list with
user-friendly message describing the active elements that could send mail
through the mail server. This has been implemented for:
- l10n_it_edi: server used to send e-invoice
- mail: optional server configured for template
- mass_mailing:
-- default mail server
-- active server configured for mailing
Mail server are referenced in other elements but are not active anymore, it is
just for temporary or history purpose. Those references doesn’t prevent the
archiving of the mail server:
- mail_message
- wizard survey_invite and compose_message
- res_config_settings
Task-2821516
closesodoo/odoo#91240
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
3c28be1b33ea18be7280d9372ebd53a54140da86 enforced readonly by default on
computed and related fields, but Activity/note was not adapted to be
readonly, leading the application to crash when editing a note.
This commit fixes it by introducing a new field to write on instead of
the computed one.
Follow-up of task-2955927.
closesodoo/odoo#99310
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
3c28be1b33ea18be7280d9372ebd53a54140da86 enforced readonly by default on
computed and related fields, but some fields were not changed to be
readonly, leading the application to crash when editing them.
This commit fixes that by introducing new fields to write on instead of
the readonly ones.
Follow-up of task-2955927.
closesodoo/odoo#99253
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>