Commit Graph
480 Commits
Author SHA1 Message Date
Zelong Lin d57c64f95b [IMP] mail, *: remove 'public' field in channel
*: 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

closes odoo/odoo#90415

Related: odoo/enterprise#30980
Related: odoo/upgrade#3850
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-06 10:57:59 +02:00
Didier (did) 7ceb079455 [IMP] mail: implement link preview with OpenGraph Protocol
OpenGraph Protocol https://ogp.me/ allow us to get some data from the link that
are shared in message.

task-2365881

closes odoo/odoo#82641

Related: odoo/enterprise#30867
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-05 14:49:30 +02:00
std-odoo 93fc52c8e1 [FIX] mail: allow a normal user to view the template body
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
2022-08-30 21:25:55 +02:00
Louis Wicket (wil) 427b984578 [IMP] mail: show more fields in mail.channel.member form view
closes odoo/odoo#92053

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-30 20:22:00 +02:00
Sébastien Geelen (sge) 1a82c91524 [IMP] mail,sms,mass_mailing_*: remove dynamic placeholder tab
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
2022-08-26 17:16:09 +02:00
std-odooandThibault Delavallée 9b11a9d82b [IMP] mail: schedule emails and notifications
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>
2022-08-25 19:57:16 +02:00
Denis Ledoux 0501bbd62e [IMP] base: uniform "groups" in back-end view
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.

closes odoo/odoo#95729

Related: odoo/enterprise#29592
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-08-19 19:10:39 +02:00
std-odoo e916f944af [FIX] fetchmail, *: use the new bootstrap 5 syntax
* google_gmail, mail, microsoft_outlook, base

closes odoo/odoo#98277

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-17 19:48:46 +02:00
Nikunj Ladava c8cdd6f5a3 [IMP] mail,sms: reset template button
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

closes odoo/odoo#83759

Related: odoo/upgrade#3674
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-17 11:20:56 +02:00
Thibault Delavallée 63e52c200f [IMP] mail: add default values when creating template from server action
Better avoid wrongly-defined templates.

Task-2613245 (Server actions mail update / cleaning)

Part-of: odoo/odoo#75906
2022-08-12 23:37:04 +02:00
Thibault Delavallée b3fc41cc44 [IMP] mail: add a post server action
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
2022-08-12 23:37:03 +02:00
Romeo Fragomeli 18b4d919df [IMP] mail: add support for RTL in discuss public
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.

closes odoo/odoo#95893

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-08-02 13:06:33 +02:00
std-odoo a0186bd4c4 [IMP] mail: improve the UI of the mail gateway allowed model
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

closes odoo/odoo#96588

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-07-28 01:30:14 +02:00
MAHAMADASIF ANSARI 3bf88fcf79 [IMP] {fetch}mail, google_gmail, microsoft_outlook: merge fetchmail into mail
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

closes odoo/odoo#94143

Related: odoo/upgrade#3615
Related: odoo/enterprise#28659
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-20 10:58:56 +02:00
Louis Wicket (wil) fdcaa53ca0 [IMP] mail, *: rename mail.channel.partner to mail.channel.member
* = calendar, crm_livechat, hr_holidays, im_livechat, privacy_lookup,
privacy_lookup, test_discuss_full, test_mail_full, website_livechat

closes odoo/odoo#95912

Related: odoo/upgrade#3681
Related: odoo/enterprise#29433
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-19 11:50:37 +02:00
Aurélien Warnon 9242c8fc5c [FIX] mail: hide stat-buttons in activity popup form
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

closes odoo/odoo#96238

X-original-commit: 7b6e700d7e7c54cac0200e98b4eb04af9f115608
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-18 21:03:09 +02:00
std-odoo e9f712278d [IMP] microsoft_outlook, fetchmail_outlook *: improve usability
* 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
2022-07-12 15:36:50 +02:00
Bruno Boi 2f8c8e22a5 [FIX] mail: misaligned channels kanban card layout
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] 3d6c13ff3f

closes odoo/odoo#95493

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-07 14:44:31 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Renaud Thiry 9eb8e52fdc [IMP] mail: Remove "duplicate" from notification form view
(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

closes odoo/odoo#95138

X-original-commit: 6f9656fc4ceeecd304f600b7cd65d649618ad182
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-04 10:19:39 +02:00
mafo-odoo 55130e50f2 [FIX] mail: try to parse scheduled date input
``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

closes odoo/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>
2022-06-30 17:41:13 +02:00
Patrick Hoste bf992f24b2 [IMP] various: improves usage of partners
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

closes odoo/odoo#89249

Related: odoo/enterprise#26442
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-14 11:41:15 +02:00
std-odoo f3f750b0f7 [FIX] mail: do not ignore email sent by mailing list
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

closes odoo/odoo#92015

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-07 10:16:18 +02:00
Pierre-Yves Dufays aa32818c30 [IMP] [test_]mail[_full]: improves message recipients visibility
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

closes odoo/odoo#90203

Related: odoo/upgrade#3487
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-01 09:57:47 +02:00
Rahul Prajapati ac00d19c8d [IMP] mail: remove alias mixin from channel
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

closes odoo/odoo#89652

Related: odoo/upgrade#3469
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-31 19:17:06 +02:00
std-odoo 036a739b62 [IMP] mail, mass_mailing: remove the <mail.mail> in batch
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
2022-05-31 14:58:53 +02:00
std-odoo 94a372dee7 [IMP] mail: improve the tree view of the <mail.mail>
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
2022-05-31 14:58:53 +02:00
Louis Wicket (wil) a3f9f345b2 [IMP] mail: add name to a group in res.users.settings view
Add name to a group in res.users.settings view so that it can be used as
a target for overriding.

Part-of: odoo/odoo#90015
2022-05-31 12:52:00 +02:00
root 4c6a010730 [ADD] mail: quick-open related record from activity
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

closes odoo/odoo#91230

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-31 11:06:56 +02:00
root 6d1f9a2000 [ADD] mail: quick-open related record from email
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

closes odoo/odoo#91228

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-31 11:06:52 +02:00
tsm-odoo 3573a7fef4 [IMP] mail, *: use wowlEnv instead of the legacy one
*: bus, calendar, hr, hr_holidays, im_livechat, mail, mail_bot, note, project,
sms, snailmail, test_mail, web, website_livechat, website_slides.

task-2582313

closes odoo/odoo#83774

Related: odoo/enterprise#26493
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-30 19:40:53 +02:00
Pierre-Yves Dufays fe2f4fee18 [IMP] base, mail, survey: improves slightly the UX
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

closes odoo/odoo#85046

Related: odoo/enterprise#24599
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-05-19 15:23:55 +02:00
std-odoo 0afd1f672f [FIX] mail: allow the admin to open any emails
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
2022-05-17 10:10:06 +02:00
std-odoo 0ad4209b6d [FIX] mail: hide restricted the attachments the current user doesn't have access to
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
2022-05-17 10:10:05 +02:00
Dossogne Bertrand a5ff710a8b [IMP] hr_holidays: improve mobile experience
- 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

closes odoo/odoo#84667

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-04-15 15:28:43 +02:00
Zelong Lin 74696cab83 [IMP] mail, hr: constraints when channel_type is not 'channel'
The group_public_id and group_id and subscription_department_ids
should only be used when the channel_type is 'channel'.

task-2766712

closes odoo/odoo#84813

Related: odoo/upgrade#3266
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-29 11:59:45 +02:00
std-odoo cd89f9b66f [FIX] mail: remove reference to Jinja
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

closes odoo/odoo#86409

X-original-commit: ad366762cb4c2086dd3f3398a19d10c9c01579a0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-14 20:47:56 +00:00
Miquel Raïch 2ba37637b5 [IMP] mail: revert of "set an integer widget on many2one_reference field"
Revert of https://github.com/odoo/odoo/commit/d3f6c3b579f39b313401c63d97b95ce690501591

Cleanup. The JS has already been adapted to many2one_reference fields.

closes odoo/odoo#85843

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-04 15:57:57 +00:00
bve-odoo 76f73a8921 [FIX] mail: modify url redirection to doc (mail servers)
Documentation structure were modified to point out to a new subtree:
    content/applications/general/email_communication/email_server

Related task:2619564
Documentation PR:1092

closes odoo/odoo#84617

X-original-commit: 10e3d3dc861d22938c92a2b4016be4f2862630c2
Signed-off-by: Vergote Baptiste (bve) <bve@odoo.com>
2022-02-16 09:40:15 +00:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
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)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
Sébastien Geelen (sge) 207a49275e [FIX] *: adapt some html fields in views
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

closes odoo/odoo#83792

Related: odoo/enterprise#23911
Signed-off-by: Antoine Guenet <age@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2022-02-02 09:03:44 +00:00
std-odoo d497dbe919 [IMP] fetchmail_gmail, google_gmail: simplify the mail server form view
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

closes odoo/odoo#83413

Related: odoo/upgrade#3199
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-01 15:32:16 +00:00
Florian Damhaut 83d7e36864 [FIX] mail: no more than 2 user in a chat
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

closes odoo/odoo#82044

X-original-commit: 85f7b7c1304222966610833dc325bc47f1c13158
Related: odoo/enterprise#23156
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-29 18:44:41 +00:00
Julien Banken 0040a7b609 [REF] sms,mail: remove no_edit attribute from fields
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

closes odoo/odoo#81210

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-13 09:49:04 +00:00
thcl-odoo 3ce63a0041 [FIX] mail: members can be added through channel settings' form view
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

closes odoo/odoo#80326

X-original-commit: 9536f8ec556670f67939fdee825630e06d5b4808
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-24 14:04:32 +00:00
std-odooandnounoubensebia cd8e0e9f46 [IMP] base, *: hide non-relevant fields for portal users
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>
2021-11-09 14:45:49 +00:00
Victor Feyens ab022ec12d [FIX] *: target v15.0 documentation with doc links
X-original-commit: acc95ec204baa1dddbe292c379a1768fe1deccbf
Part-of: odoo/odoo#77923
2021-10-07 17:59:52 +00:00
root 50f6e5f2be [IMP] mail: quick-open related record from message
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

closes odoo/odoo#77675

closes odoo/odoo#77803

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-05 12:36:00 +00:00
Louis Wicket (wil) 985b7f37d7 [IMP] mail: merge welcome and thread views
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.

closes odoo/odoo#77381

X-original-commit: 97ed683e3e7cc6b340bb78c4faa01a703a573f32
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-30 17:11:46 +00:00
Julien Banken 259508fdd4 [IMP] mail: improve the settings page of the mail template
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
2021-09-30 13:31:52 +00:00