Before this commit, the RtcSession fields were updated in the
`_willDelete` which could cause tracebacks.
closesodoo/odoo#99701
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When using the composer in mass mail mode, no explicit 'message_type' is given
to created 'mail.mail' records. By default those are set to 'email'.
In this commit we make it explicit, as it may change in a near future. This
type is not really 'notification', 'comment' or 'user_notification', so using
'email' is fine currently. It is used more for incoming emails but we don't
distinguish outgoing emails currently.
Task-2710804 (Mail: Clean MailThread API)
Part-of: odoo/odoo#100137
Purpose of this commit is to add some test about MailThread helpers built on
top of ``message_post`` / ``composer`` (log, post with view, ...). Some tests
about batch are also added.
Some performance tests are also added for those helpers.
Counters are updated. Note that they did not change, it is just an update
based on current master counters.
Task-2710804 (MailThread Api Cleaning)
closesodoo/odoo#100184
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
* = im_livechat, snailmail
The model manager will now automatically add `isCausal: true` to inverse
of identifying fields. This commit implements the feature and removes
now unnecessary declarations of `isCausal: true` from the code.
Task-2741402.
closesodoo/odoo#100119
Related: odoo/enterprise#31290
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
We don't want any padding in those dialogs. The presence of the
padding was a consequence of the rewritte of that dialog in owl.
It is a frequent usecase to remove the padding from the body of
dialogs. We thus introduce a new props on Dialog and when this
props is set to `true`, we do not set any padding on the body.
This commit refactors other usecases to make them use the added
props.
closesodoo/odoo#100045
Signed-off-by: Géry Debongnie <ged@odoo.com>
This change allows for adding and removing followers from threads
by directly setting the message_partner_ids field of threads.
This enables the use of many2many_tags to add followers to a thread.
Task-2804888
closesodoo/odoo#95645
Related: odoo/enterprise#29284
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
XML files are now declared in python module manifests. During the qweb
't-call-asset' directive, assetbundle will fetch the declared xml files,
apply the inheritance (t-inherit) and create a javascript service (for
eg: 'web.assets_backend.bundle.xml') which is added at the end of the
*.js mimifier file.
When the debug mode is activated, comments are added in the template
indicating which file the template comes from as well as the
inheritances applied to it.
****
JavaScript:
assets.js (module @web/core/assets) takes care of loading libraries,
javascripts and styles.
`loadJS(url)` (loads the javascript and returns a resolved promise when
the templates are also loaded via the '*.bundle.xml' service)
`loadCSS(url)` (loads the style a resolved promise when the file is
loaded)
`loadXML(xml, app=assets.defaultApp)` (load template into
application/owl, used by the `*.bundle.xml` services)
`getBundle(bundleName)` (get the bundle descriptor)
`loadBundle(desc)` (load the files and bundle from a descriptor)
templates (XML element content all owl templates)
A new `ready(serviceName)` method on boot.js lets you know when a
service is loaded are the require.
The xmlDependencies attribute no longer exists.
Python:
The xmls taken into account by assetbundle.py, applying `t-inherit`
inheritances and adding an `name_of_the_bundle.bundle.xml` service in
the generated JavaScript file.
****
Every manifest changes is into the next commit, except 'web_tour' in
this current commit as example.
Part-of: odoo/odoo#95500
Make mail_notification_layout as the default mail template and remove
message_notification_email. We now only have 2 main notification mail layout
templates (outside of a light one): the default one and one that inherits from
it to only change the signature to the responsible instead of the author one.
In this operation the layout of message_notification_email has been integrated
in mail_notification_layout to support outlook mail client for which
message_notification_email has just been reworked (odoo/odoo#92847).
Technical note: we have integrated the "internal communication" banner from
"message_notification_email" into the new default template
"mail_notification_layout" which cause one added query in the test for querying
the flag internal from mail.message.subtype.
Task-2801600
Part-of: odoo/odoo#88466
"mail_notification_paynow" mail template layout has been renamed to
"mail_notification_responsible_signature_layout" as it now only differ by the
signature. It allows to use it more widely.
Task-2801600
Part-of: odoo/odoo#88466
Ease the understanding of the notifications sent when users are assigned to an
activity or a model (task, lead, ...).
Technical note:
- the customization of data sent to the email layout template (here subtitles)
should be done by overriding
mail_thread._notify_by_email_prepare_rendering_context on the model.
But in this case, we send an activity (ex.: todo) for a model (ex.: crm.lead)
which involves 2 models. Data from both models must be sent to the template
layout. To solve this problem an optional parameter to
mail_thread.message_notify has been added: subtitles. This allows the
caller which knows about the 2 models to set the values for subtitles for
the template.
- mail_activity._render_notify_header has been added to render the subject and
subtitles using the language of the recipients through the context lang
variable.
- a generic mail notification template has been added and the specific
mail_notification_paynow has been derived from it as the only change is the
handling of the signature.
Task-2801600
Part-of: odoo/odoo#88466
Clicking on kanban activity Mark as Done button now works as expected, either displaying one empty panel or displaying no panels at all.
Before this commit, repeating a click on the button did not reset the panel, so the next click added another form to the panel.
Also, clicking on the button left other panels open.
task-2961943
closesodoo/odoo#98832
Signed-off-by: Arnaud Joset <arj@odoo.com>
This views has multiple custom features such as file upload, attachment
viewer and download.
A lot of files have been rendered obsolete and have been deleted,
notably `file_upload_mixin` which has been replaced by the
file_upload service and hooks.
closesodoo/odoo#99769
Related: odoo/enterprise#31145
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- adapt the html field and mass_mailing_widget to be owl components
- adapt the mass mailing view to be an owl view
task-2898432
closesodoo/odoo#94875
Related: odoo/enterprise#30915
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit the error raised/logged when rejecting the afterEvent
promise was imcomplete. This is due to the fact we're creating the
error inside the promise itself. In order to get a better stack trace,
the error is now declared outside of the promise.
Moreover, both `afterNextRender` and `afterEvent` functions were using
`console.error` before rejecting the promise. This is also a problem
since runbot will show the error printed by `console.error` instead of
the one of the test failure. In order to solve this issue, those two
`console.error` have been replaced by `console.warn`.
closesodoo/odoo#99899
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This move will remove the need of the adjustment compute and therefore
will avoid writing on computed fields.
closesodoo/odoo#99891
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The main goal is to reduce the number of KB sent by the `get_views`
method to the web client by getting rid of things not used by the web
client.
This revision aims to only pass the `fields_get` info of fields
actually required by the web client.
Before this revision, for each view, the list of all fields
of all models implied in the view are passed.
For the main view, it's required to pass all the fields,
for the search view: The advanced search needs to know all fields
of the model to be able to let the user to do advanced filters and
groupbys on the model fields.
But, for the models of the subviews (one2many/many2many embbeded views),
this is not required. Only the fields included in the view are required.
Also, if the search view is not requested by the web client,
then it's also not required to pass all the fields of the main model.
After this revision, for each view, pass the `fields_get`
info of only the fields actually implied in the view.
For the search view, info of all fields are passed,
not only the ones implied in the view.
For instance, on the `get_views` of `account.move`,
this allows a gain of an extra 18,05KB,
reducing from 165.82 to 147.77KB.
In addition, before this revision, the whole content of `fields_get`
was stored in the cache of `_get_view_cache`, meaning per view.
If 3 views were requested on `get_views`
let's say kanban, list, form,
the same whole `fields_get` info, of all fields,
was stored 3 times in the cache.
This revision removes the content of fields_get of the cache
for `get_views`, to avoid storing multiple times the exact same
information in the cache, therefore gaining tremendous memory,
while not loosing that processing time.
The decrease of speed is only 1~3ms per call to `get_views`.
This is mainly because all the information gathered by `fields_get`
is already in the cache. For instance, it doesn't require any SQL
request (at the moment). e.g. the translations (string, help, selection)
are already cached.
closesodoo/odoo#99834
Related: odoo/enterprise#31167
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
An explicit access check when posting a message has been added at odoo/odoo@9920f20e4c
when adding notably computation of display_name as sudo. However this is not
the role of ``message_post`` to check access for such an implementation
details.
Access is anyway already granted through the various browse and record access
done during the posting process. Moreover even message access (creation or
read) is protected notably through its related record ACLs.
Portal/Public access on message_post is anyway done through dedicated routes
using tokens or hash/pid that call message_post as sudo. We can therefore
remove the explicit access check added a bit wildly in the middle of the code.
Task-2710804 (Mail: Clean MailThread API)
closesodoo/odoo#99654
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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>