*: 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>
Followup of odoo/odoo@1a3e713
Bug
===
If the user doesn't have the template editor, he cannot open the template
preview.
Technical
=========
The reason for that is because the web editor moves some CSS properties,
and so when the user tries to open the preview, an access error is raised.
Ideally, the template form view should not be editable if the access
rules do not allow it. But in _postprocess_tag_field, we only check
for access right because we don't have the record. So a user without
write access rules, but having write access right can edit the template
in the UI, and gets an error when saving.
Also, the web editor should not save the HTML value if no change are
made on the field (like all other text / char field).
To mitigate the issue in stable, we add a computed field that check the
access rules and make the body readonly if he can not edit the template.
So the web editor is not loaded, the CSS properties are not moved. Other
possible solutions are way to complex technically speaking (editor internals
to update in frontend, complex comparison of html blobs in backend, cache
usage making fields_view_get override not working in all cases, ... )
As the HTML body look weird in readonly mode, add the same border as the web
editor.
Task-2845877
X-original-commit: dcf3ab5fb41aa9ef6e59b2155bfd192e551b6476
Part-of: odoo/odoo#99256
We remove the existing dynamic placeholder generator tab,
in mail and sms creation views.
In preparation of the implementation of a new way to generate
the dynamic placeholders
task-2154624
Part-of: odoo/odoo#71878
Purpose
=======
Currently, only email sending can be scheduled with the `scheduled_date` field
defined on on <mail.mail>. It's not possible to delay the sending of
notifications.
We want to be able to delay the sending of the emails, but also the inbox
and bus bus notifications.
Technical
=========
For that purpose, we created a new model which stores the message we need to
notify with the scheduled date. When a scheduled_datetime is given we skip the
notification process. Instead an entry in that new model is created. A cron
regularly polls the scheduled message and launch the notification process on
messages that are ready to be sent.
Task-2207626 (Rating: Delay rating notification to ease feedback)
Part-of: odoo/odoo#95623
Co-authored-by: Thibault Delavallée <tde@odoo.com>
This revision is to make uniform the behavior of the `groups` attribute
on the Python model fields
and on the node in the view architecture.
In both cases, remove the node from the view completely.
Before this revision,
in a back-end view:
- In the Python model, if a field has the `groups` attribute set
and the user is not part of
the groups, the field is removed, completely, from the view.
- In the view architecture, if a node has the `groups` attribute set
and the user is not part of
the groups, the node is made invisible (not completely removed, just
made invisible).
in a front-end view:
- if a node has a "groups" or "t-groups" set and the user
is not part of the groups, the node is removed from the view.
So it's 2/3 cases removing nodes restricted to a group.
and 1/3 case making invisible nodes restricted to a group.
It's simpler to have a uniform behavior for the 3 cases,
simpler to understandard for developers.
In addition, this will help for the goal to cache back-end views.
It makes possible to convert views using the `groups_id` field
by moving the content of these views directly
in the view to which they add content which is suppose to be completely
removed when the user has not the according group.
By getting rid of the `groups_id` many2many field on `ir.ui.view`,
it makes possible to cache the view architecture without
requiring to use the groups in the cache key.
Currently, if we want to cache the view architecture,
it would be required to use the intersection of the user
groups with the `groups_id` groups of the view,
making it costly to compute the cache key,
therefore altering the performance point to cache the view
architectures.
closesodoo/odoo#95729
Related: odoo/enterprise#29592
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Before Commit :
- Sometimes user breaks their Mail/SMS templates and have no way to go back to the
original one easily. They don't have any option to reset the template.
After Commit :
- Added new "Reset Template" button
- now user can reset the Mail/SMS template to its first version.
- also it will update the translation of the template
- added New "Reset Mail Templates/Reset SMS Templates" action to edit multiple templates
task- 2231977
closesodoo/odoo#83759
Related: odoo/upgrade#3674
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently only an email action based on template exists in server actions when
having mail app installed. It basically sends an email based on a mail template.
However being able to post a message on record is also useful. Instead of
sending emails it post on a document as a comment or as a note, like what
users can do using the chatter. Notification flow for those cases is the
classic from post: followers, specified partners, Inbox/Email, ...
Task-2613245 (Server actions mail update / cleaning)
Closes#45640
Part-of: odoo/odoo#75906
As `discuss_public_channel_template` is sandboxed for the `webclient`
the following CSS rule is not applied anymore.
```css
.o_web_client {
direction: ltr;
}
```
This commit adds it specifically for this template to reflect the
language direction in this sandboxed environment.
closesodoo/odoo#95893
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Purpose
=======
Show a help message in the "mail gateway allowed" list view that
explains why this model is useful and what the email limit is.
Remove the normalized email from the list view and rename the label of
the email field.
Task-2885455
closesodoo/odoo#96588
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
The `fetchmail` module is build on top of the `mail` module and enables
the incoming email capabilities. However, using the `mail` without
incoming email server is not a good use case.
This commit merges the `fetchmail` moudule into `mail` and lessens the module
complexity, along with adapting the xml/external ids in the dependent modules.
task-2797458
closesodoo/odoo#94143
Related: odoo/upgrade#3615
Related: odoo/enterprise#28659
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Small oversight of: 4c6a010730
This commit simply hides the stat-buttons when the mail.activity is opened in
the popup form.
When in that popup form, you don't want to switch your context, especially
considering the only button currently available allows you to open the related
document (from which you just opened the activity popup form, creating a loop).
Task-2920490
closesodoo/odoo#96238
X-original-commit: 7b6e700d7e7c54cac0200e98b4eb04af9f115608
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
* fetchmail, google_gmail, fetchmail_gmail
Purpose
=======
Improve the usability of the outlook modules.
Specifications
==============
Remove the checkbox "Use Outlook" and instead use the
smtp_authentication and the server_type, to be consistent with Gmail.
Hide the password field for Outlook / Gmail mail servers.
Add constraints on the outgoing mail server to force the user to use
the right configuration (e.g. the from_filter, so the sending does not
fail).
Add an option in the mail module to install Outlook.
Show a message for the outgoing mail servers to explain each
authentication methods.
Task-2811567
Part-of: odoo/odoo#88215
Since the new kanban view [1], the kanban card layout of the channels
had a weird alignment of its inner elements.
This is due to the fact that now the "kanban-box" defined in the arch
is wrapped inside the div.o_kanban_card instead of being merged with it.
[1] 3d6c13ff3fclosesodoo/odoo#95493
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
(To be commited with [#94024](https://github.com/odoo/odoo/pull/94024))
Duplicating an email sent from Odoo would raise an error because some required fields could not be set.
Setting those fields on duplication does not make sense, duplication is to be disabled on e-mails.
As this applies to some messages and no use-case could be found for the duplication of messages or notifications,
both also had duplication disabled.
Task-2857244
closesodoo/odoo#95138
X-original-commit: 6f9656fc4ceeecd304f600b7cd65d649618ad182
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
``scheduled_date`` field of ``mail.mail`` is a char field since its addition
in 2015 (see odoo/odoo@364b4ba06d). As its first usage was in combination with
mail templates, a char field was used to simplify its implementation.
However this technically allows to store whatever value in that field. Using
it in a filter with a datetime argument is quite strange. A workaround is
to try to parse as much as possible the inputs, remove timezone information,
try to localize it, and have it in regular server format to enable filtering
on it.
We consider value should be set in UTC. If we have a specific timezone set
on the input we localize it to UTC. Otherwise we consider the input was done
in UTC, as all datetime fields. It is the role of the business code generating
mail.mail to either give the timezone, either already convert into UTC.
This might solve the following bug
Step to reproduce:
activate the developer mode
go to settings - technical - emails
create a new email and set the Scheduled Send Date in the future
run the scheduled action Mail: Email Queue Manager
Current behavior:
the email is sent and the action does not consider the filter
Expected behavior:
the email is not sent and will only be sent when the scheduler detects
that scheduled_date exceeds the current time.
Task-2833300
opw-2823106
closesodoo/odoo#94937
X-original-commit: 5c113cb9d54e051132a9a50deb2fcf61f9c9dc2c
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
SPECIFICATION
Various change for the partner view:
- Moved the activity widget to the bottom right of the kanban
- Moved the informations badge to the bottom right next to the
activity widget and made them clickable
- Change the address options order and add a small help below
- Change the 'Remove' button function from delete to remove from
the company and add a delete button to the right end.
- Correct some typo
- Add an 'Archived' ribbon to the kanban card
- Change various small things
LINKS
Task-2821356
closesodoo/odoo#89249
Related: odoo/enterprise#26442
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Bug
===
Since 9c1cdd330e we ignore all incoming
email sent by mailing lists.
They are real use case when people want to be able to receive email
from mailing list (e.g. if they subscribed to an automated service,
or if someone is in leave and has done a auto-replier for that, etc).
Add a model to whitelist some email address. The alias limit
does not apply for those emails.
Task-2862092
closesodoo/odoo#92015
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
All the recipients of message were not always displayed in discuss and some
users were wondering if the message has been sent to everybody concerned.
This solves the problem by allowing to specify whether to display all
recipients based on the message sub type and defining for which sub type it
must.
Technical note:
- The added query count in some tests is due to the fact that the inbox
notification can now be displayed on the client. Before they were discarded
right away. Now additional check must be done. The added query is due to the
test self.res_partner_id.partner_share which is now also done on inbox
notifications (This has been determined by testing locally for all tests except
one: TestMailHeavyPerformancePost.test_complete_message_post, but it is likely
for the same reason).
- A speed optimization could be to add mail_notification.display as stored
computed field in order to avoid that extra read but it would add a little more
needed storage.
Task-2429708
closesodoo/odoo#90203
Related: odoo/upgrade#3487
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
mail.alias.mixin is being used in mail.channel
After this commit:
removed mail.alias.mixin with all of its uses in mail.channel
Task-2823691
closesodoo/odoo#89652
Related: odoo/upgrade#3469
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Purpose
=======
Improve the performance of mass mailing by removing the <mail.mail>, in
batch, all at once. The unlink operation is very expensive for the ORM,
in terms of SQL queries.
A new field `to_delete` is required to know which <mail.mail> we need
to delete. The reason is that the `failure_type` is stored on the
<mail.notification>, and it's possible to have <mail.mail> without
<mail.notification>.
Task-2587345
Part-of: odoo/odoo#73271
Purpose
=======
Show the state of the <mail.mail> in the tree view and color only the
badge widget instead of the entire row.
Fix a typo in the help of the scheduled_date field on mail template.
Task-2587345
Part-of: odoo/odoo#73271
Current behavior before PR: You have to find the right menu/view and then take
over the ID stored on the activity (through export) to find back the record.
This is annoying, painful and error prone.
Desired behavior after PR is merged: By adding a smartbutton the user can
quick-navigate to the related record in a second. This allows for quickly
finding and opening records which is usually handy when debugging things or
finding back related records.
Task-2868230
closesodoo/odoo#91230
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Current behavior before PR: You have to find the right menu/view and then take
over the ID stored on the email to find back the record. This is annoying,
painful and error prone.
Desired behavior after PR is merged: By adding a smartbutton the user can
quick-navigate to the related record in a second. This allows for quickly
finding and opening records which is usually handy when debugging things.
Task-2868230
closesodoo/odoo#91228
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Improves UX by adding placeholders to clarify the purpose of some inputs and
changing some field layout to ease the edition (with the use of multi-lined
editor).
Details:
Some placeholders have been added:
- description field of survey.question
- default_note field of mail.activity.type
- summary of mail_activity_type_view_form
Some field layout have been turned into multi-lined editor:
- default_note field of mail.activity.type
- write a message in mass mail mode (email_compose_message_wizard_form)
added border for field help of edit action (class oe-bordered-editor)
Task-2766291
closesodoo/odoo#85046
Related: odoo/enterprise#24599
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Bug
===
When the admin open an email, he might get an error message if he can
not access the mail message.
Technical
=========
To allow to bypass mail message ACl without adding extra SQL queries, we
need to overwrite "_add_inherited_fields".
This trick add a related_sudo on the inherits fields, it can't be done with
>>> subject = fields.Char(related='mail_message_id.subject', related_sudo=True)
because the field of <mail.message> will be fetched two times (one time before of
the inherits, and a second time because of the related), and so it will add extra
SQL queries.
Task-2464212
Part-of: odoo/odoo#78734
Bug
===
When the admin open an email, he might get an error message if he can
not access one of the attachment of the email.
Now the admin is able to view / edit the attachments he has access to.
Task-2464212
Part-of: odoo/odoo#78734
- The dashboard list view is replaced by a kanban view.
- When you have a time off with a joined document when you click on it, the attachment view is now kanban and not list. The dropdown in the kanban card allows to download the file.
taskID #2658415 [Time Off] Mobile experience
closesodoo/odoo#84667
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The group_public_id and group_id and subscription_department_ids
should only be used when the channel_type is 'channel'.
task-2766712
closesodoo/odoo#84813
Related: odoo/upgrade#3266
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Purpose
=======
Since 68182baff4bdf4b3bcc1f46b361f5a5b8ac9aa11 , Jinja mail templates
have been replaced by QWeb templates. But some reference to Jinja
in the mail settings have been forgotten.
Task-2701037
closesodoo/odoo#86409
X-original-commit: ad366762cb4c2086dd3f3398a19d10c9c01579a0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Documentation structure were modified to point out to a new subtree:
content/applications/general/email_communication/email_server
Related task:2619564
Documentation PR:1092
closesodoo/odoo#84617
X-original-commit: 10e3d3dc861d22938c92a2b4016be4f2862630c2
Signed-off-by: Vergote Baptiste (bve) <bve@odoo.com>
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.
Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)
closesodoo/odoo#84280
Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Some html field are not in their ideal style.
As the style for html fields is now dependent of
where you are in the xml view ( in group or not),
we have to adapt some views and flags some fields
to ensure they have the correct look.
This change is only be a visual enhancement
and should not prevent the function of said html fields
even if the views are not updated.
task-2637488
# Conflicts:
# addons/mail/wizard/mail_compose_message_views.xml
# addons/website_slides/views/slide_channel_views.xml
# Conflicts:
# addons/sale/views/sale_views.xml
closesodoo/odoo#83792
Related: odoo/enterprise#23911
Signed-off-by: Antoine Guenet <age@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Purpose
=======
A field `use_google_gmail_service` has been used in stable to define
a mail server which use Gmail authentication.
But now that the fields `smtp_authentication` exists, we want to use it
to simplify the mail server form view. For the incoming mail server,
the field `server_type` will be used for the same purpose.
Add a new field to have the option to install `google_gmail` in the
main settings page.
Task-2170676
closesodoo/odoo#83413
Related: odoo/upgrade#3199
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Step to reproduce:
- Settings -> Mail channel -> any chat-type channel
- Go to Members
- Add an user
- Refresh the page
Current Behaviour:
- Traceback
- Chat are designed for 2 users and you should not be able to add more
Behaviour after PR:
- Can only edit members of channel if it's not a chat
- User error if try to add more user
- Fix traceback if there is too much users
opw-2717341
closesodoo/odoo#82044
X-original-commit: 85f7b7c1304222966610833dc325bc47f1c13158
Related: odoo/enterprise#23156
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
It turns out that the 'no_edit' attribute of the fields is deprecated
and doesn't do anything (there is no JavaScript or Python code using it).
We will hence remove that attribute from the views to clean them.
task-2686290
closesodoo/odoo#81210
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Current behavior :
When we try to add a member through channel's settings by clicking on "Add a line", a blank line is correctly added but can't be edited.
Steps to reproduce :
- Install Discuss
- Go to channel settings
- Try to add a member by clicking on "Add a line"
Reason :
Since commit 89eef4cdd419cc23cfb8d3e0af7a7115119549c2 , 'partner_id' field as been set to readonly because it doesn't make sense to edit the partner_id of a channel. However, this prevents the possibility of adding a member.
( diff : https://github.com/odoo/odoo/pull/75496/files#diff-d02eca5ffaa6b9765330a905661cd6cb917b92d851b473d459ee011bb2c5be3cR17 ).
OPW-2677329
closesodoo/odoo#80326
X-original-commit: 9536f8ec556670f67939fdee825630e06d5b4808
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Purpose
=======
Hide non-relevant fields for a portal user. E.G. we want to hide the
notification type, the menu customization... Because those fields
make no sense for a portal user.
Force the non-internal user to receive notifications by emails since
they can not open Discuss.
Task-2508521
Part-of: odoo/odoo#77766
Co-authored-by: nounoubensebia <neb@odoo.com>
Before this commit if you found a message and wanted to open the related record you would need to find it manually by finding the right view and then using the ID stored on the message to open it.
By adding a smartbutton the user can quick-navigate to the related record in a second.
This allows for quickly finding and opening records which is usually handy when debugging things.
Ref Task-2660873
closesodoo/odoo#77675closesodoo/odoo#77803
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit will merge welcome and thread views in the same route and
template. The aim is to make the user interacting with the page (by
landing them on the welcome view first) so that the browser allows the
page to play audio and to switch to full screen.
closesodoo/odoo#77381
X-original-commit: 97ed683e3e7cc6b340bb78c4faa01a703a573f32
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The settings page of the mail template has too specific placeholders. To
improve the genericity and the consistency of the placeholders, we will
use placeholders about the same topic.
task-2523036
Part-of: odoo/odoo#71413