Commit Graph
144 Commits
Author SHA1 Message Date
Yannick Tivisse 7978d4ba0f Revert "[IMP] *: Define groups on res.users models"
This reverts commit 99f497b390.
2018-09-10 14:23:42 +02:00
Christophe Simonis a719cf2563 [MERGE] forward port branch saas-11.3 up to b4555df336 2018-07-30 17:02:28 +02:00
Christophe Simonis b4555df336 [MERGE] forward port branch saas-11.2 up to 3376bad191 2018-07-30 15:51:38 +02:00
Christophe Simonis 3376bad191 [FIX] event: remove duplicated method
Oversight of previous forward-port
2018-07-30 15:46:52 +02:00
Christophe Simonis a6e401a2ee [MERGE] forward port branch 11.0 up to 44ea58234e 2018-07-30 14:08:56 +02:00
Christophe Simonis 248a59553d [MERGE] forward port branch saas-15 up to 535d50afbd 2018-07-30 12:53:34 +02:00
Christophe Simonis fbd52d57d8 [MERGE] forward port branch saas-14 up to b8f866c57b 2018-07-30 11:44:31 +02:00
Olivier Dony 4517050572 [FIX] event: prefer registration email over partner email
As of rev. ca989b6548, the default
recipients of a model record are used to filter out blacklisted and
duplicate emails during a mass-mailing. This can match both either
partner_ids or emails, as returned by
`message_get_default_recipients()`.

The problem with even registration is that a single partner, sometime
anonymous (Public User) can be used to register several participants.
We therefore need to override `message_get_default_recipients()` to that
intent, similarly to what is done in crm.lead since
ca989b6548.

Without this, mass-mailings sent to free event attendees would never be
sent, as they would all appear to be duplicates of each other.

Fast-fwd port of 92a224ee3a
2018-07-27 00:30:06 +02:00
Olivier Dony 92a224ee3a [FIX] event: prefer registration email over partner email
As of rev. ca989b6548, the default
recipients of a model record are used to filter out blacklisted and
duplicate emails during a mass-mailing. This can match both either
partner_ids or emails, as returned by
`message_get_default_recipients()`.

The problem with even registration is that a single partner, sometime
anonymous (Public User) can be used to register several participants.
We therefore need to override `message_get_default_recipients()` to that
intent, similarly to what is done in crm.lead since
ca989b6548.

Without this, mass-mailings sent to free event attendees would never be
sent, as they would all appear to be duplicates of each other.
2018-07-26 23:52:18 +02:00
XavierDo c8d283a592 [FIX]: mail: storing add_sign on mail message
Only the add_sign from notif_values is usefull for a resend. We can consider
that a mail on resend can be delete in every case, and we can find the
model_description from model since a resend can only be performed on
message linked to a model.

The other notif_values are now parameter in order to ease the understanding
of what can transit through this flow.

Task: #1860054
PR: #25622
2018-07-11 12:25:33 +02:00
Christophe Simonis 73652a0b19 [MERGE] forward port branch saas-11.3 up to 50860317cc
Note: 1aacc96262 has been ignored and will
be forward-ported later
2018-06-15 13:27:27 +02:00
Christophe Simonis 50860317cc [MERGE] forward port branch saas-11.2 up to b170a753e1 2018-06-15 11:30:27 +02:00
Christophe Simonis b170a753e1 [MERGE] forward port branch 11.0 up to b05e4d5f95 2018-06-15 10:15:27 +02:00
Christophe Simonis b05e4d5f95 [MERGE] forward port branch saas-15 up to a53bea49fe 2018-06-14 21:28:39 +02:00
Christophe Simonis a53bea49fe [MERGE] forward port branch saas-14 up to 7c8f335988 2018-06-14 19:19:14 +02:00
Nicolas Martinelli 7aef847585 [FIX] event: event stat button
Display stat button to groups who have read access to events.
2018-06-14 18:17:00 +02:00
Christophe Simonis 803df909b1 [MERGE] forward port branch saas-14 up to 804d68efe5 2018-06-14 18:05:38 +02:00
Nicolas Martinelli 1bde9b1ec4 [FIX] event: do not use sudo to compute event_count
This reverts commit c0618d72d0.
2018-06-14 10:15:23 +02:00
Christophe Simonis d45c32baac [MERGE] forward port branch saas-15 up to bdd051bf78 2018-06-13 18:13:48 +02:00
Christophe Simonis bdd051bf78 [MERGE] forward port branch saas-14 up to c43c540172 2018-06-13 14:12:12 +02:00
Christophe Simonis c43c540172 [MERGE] forward port branch 10.0 up to 788750ea51 2018-06-13 10:55:58 +02:00
Christophe Simonis af1853775f [MERGE] forward port branch 11.0 up to e3658d6f56 2018-06-12 16:49:11 +02:00
Christophe Simonis e3658d6f56 [MERGE] forward port branch saas-15 up to d44cd77884 2018-06-12 16:31:54 +02:00
Jairo Llopis ce6b6e6458 [FIX] event: do not suggest public user email in registration chatter
Chatter suggests to include recipients on several objects, notably on
registrations. When a registration is done through a public interface
like website in website_event associated partner is the public user.
In that case proposing to mail the public user does not make sense.
It should propose the real email stored on the registration record.
To fix that we filter the partner if it is linked to the pubic groups.

The fix includes a sudo + context switch in a loop. As this method is
called only on a recordset of one element this has no impact on real use
case. Purpose is to keep the diff minimal.

Closes #23187 .
2018-06-12 15:42:40 +02:00
Christophe Simonis d44cd77884 [MERGE] forward port branch saas-14 up to 284ed9216c 2018-06-12 12:19:14 +02:00
RomainLibert c0618d72d0 [FIX] event: use sudo to compute event_count
You could not see the partner page when not having the event rights.
2018-06-08 16:33:45 +02:00
Pratima Gupta c5419e61d9 [IMP] event, website_event_track: make email templates bioutifoul
Purpose of this commit is to enhance quality of templates proposed by Odoo
and make them use notification layout when send by emails. Those emails
are cleaner and more up to date compared to other emails.

Including
  * registration and reminder templates that are send directly by email
    are improved to directly include the notification layout in the body
    itself;
  * improve layout of badge template;
  * use notification layout when sending badge;
  * improve layout of track confirmation template;
  * use notification layout when sending templates based on stage change;

This commit is related to task ID 51122 (and PR #24052).
2018-06-08 15:35:25 +02:00
Christophe Simonis f36e6917bd [MERGE] forward port branch saas-11.3 up to 37eed7c509 2018-05-29 17:34:43 +02:00
Benjamin Stiens 6383120f3b [IMP] all: Improve error messages
Many error messages are misleading or too "vague"
This task aims to improve all error message.

Task #47042
PR #23321
2018-05-28 16:45:48 +02:00
Christophe Simonis 644f0959d0 [MERGE] forward port branch saas-11.2 up to 1655202924 2018-05-17 14:23:37 +02:00
Christophe Simonis 1655202924 [MERGE] forward port branch 11.0 up to 59a8a1cd8e 2018-05-17 13:19:49 +02:00
Jeremy Kersten b8f5f17aed [FIX] event: don't block scheduler at first exception
Before this commit, when a scheduler fail for one event (eg: error in send_mail),
the cron stop and don't continue to process all others event's scheduler.

Now we try to warn (~ randomly once by hour) the responsible/organizer/write_uid
that an error occurs with this scheduler, and we continue to process the others.

opw-1840497
closes #24741
2018-05-16 11:58:11 +02:00
Jeremy Kersten 04ce6e84c2 [IMP] website_event: show physical event before online if country specific.
If a country is specified, we show also all our online events to promote it since
they can be followed from anywhere. But we show in priority the physical event.

opw-1845012
2018-05-15 17:24:50 +02:00
Yannick Tivisse 99f497b390 [IMP] *: Define groups on res.users models
The reified view on the res users will be dropped in the following commit.

The previous commit adds support to define each group as a computed field on the res users.

This commit defines:
- A boolean field for each 'isolated' res.group, i.e. a group in the hidden category.
- A selection field for each 'Application' res.group, i.e. a group in a application category.

Example:
- The group to manage pricelist in sales becomes a boolean field
- The groups project user/manager become a selection field
2018-04-26 15:13:38 +02:00
Thibault Delavallée 8a026e26c6 [IMP] mail: update _notify API
Purpose of this commit is to allow to give additional values when rendering
notification emails and to make some parameters explicit.

This commit updates the _notify API. It allow to propagate a dictionary
containing values given to the rendering of the notification template.
This allow to have more complex templates and/or to control the rendering
depending on some parameters. Indeed currently only some fixed values and
values coming form the message to notify are given to the rendering
context.

First use will be soon when pushing notification emails not necessarily
linked to documents. In this process some values will be given by the caller
and not only by the message context anymore.

This commit also moves some context key used to control the notification
process directly in values given to the _notify method. It allows to make
those parameters explicit and rely less on context.

The _notify method now takes a values dictionary that may contain

 * add_sign: add user signature to notification email, default is True.
   It replaces the ``mail_notify_user_signature`` context key;
 * mail_auto_delete: auto delete send emails, default is True. It
   replaces the ``mail_auto_delete`` context key;
 * other values are given to the context used to render the notification
   template, allowing customization.

It allows to remove some context switch notably in the composer. A values
dictionary is computed and given to message_post and then propagated to
the notification mechanism.
2018-02-20 14:32:09 +01:00
Christophe Simonis bd16df15ea [MERGE] forward port branch saas-16 up to 98d01e46e5 2018-02-20 11:53:06 +01:00
Christophe Simonis 98d01e46e5 [MERGE] forward port branch saas-15 up to 482370d014 2018-02-20 11:08:54 +01:00
Christophe Simonis 8b527229bf [MERGE] forward port branch saas-14 up to e3d39b0e5f 2018-02-19 19:01:54 +01:00
Christophe Simonis e3d39b0e5f [MERGE] forward port branch 10.0 up to de62e33618 2018-02-19 17:07:29 +01:00
qsm-odoo de62e33618 [FIX] calendar, event: do not send emails to canceled attendees
Backport of https://github.com/odoo/odoo/commit/cf753a7fdf1739dcf37d2ad74f4c8efb3d4ff3b3
(it was finally considered as a real bug to fix in stable versions
from 10.0).

opw-769955
opw-814459
Closes https://github.com/odoo/odoo/pull/22882
2018-02-19 14:27:29 +01:00
qdp-odoo 4a3df5256a [FIX] *: fixed decorators on copy() 2018-02-09 10:32:23 +01:00
Christophe Simonis e00a447e2c [MERGE] forward port branch saas-11.1 up to 7e469eb77a 2018-02-01 18:20:28 +01:00
Christophe Simonis 7e469eb77a [MERGE] forward port branch 11.0 up to f5e7b86686 2018-02-01 18:15:21 +01:00
Thibault Delavallée 304e6cf90b [IMP] mail: make notification layout a real parameter of message post
Purpose of this commit is to add a new parameter to message post that
is the layout used when sending notification emails. It will soon
replace the context use of custom_layout in some case. It will also
allow to control a bit the notification process from the message_post
API in more or less planned future mail updates.

This commit also slightly changes the way notification process handles
deleted or unknown rendering templates. Before this commit any missing
custom template was replaced by the base template. A missing base
template was leading to a crash. Now it simply logs a warning and avoid
crashing.
2018-01-29 14:53:54 +01:00
Nicolas Martinelli 6a91ae0c18 [FIX] event: mail after event
Prevent sending emails that were scheduled before the event to be sent
after the end of the event.

opw-802973
2018-01-29 13:53:40 +01:00
Thibault Delavallée d139e92c62 [REF] mail: move message notify and author subscription in after_post hook method
Purpose
 * move notify in message_post instead of always doing it at message
   creation

Specifications
 * message create should only create a message
 * message post should be in charge of calling the notification process
2018-01-11 11:53:58 +01:00
Christophe Simonis 228ecdbe28 [MERGE] forward port branch 11.0 up to ff0abd214c 2018-01-10 11:41:35 +01:00
Goffin Simon fe0fc9eef4 [FIX] event: Duplicate an event and try to publish it leads to the previous event webpage
- Steps to reproduce the bug:

Go to events ->Duplicate an existing published event
Try to publish that new event

- Bug:

You get redirected to the previous event webpage, which is already published.
Unable to publish the event from that page.

The url used to access the event is computed the function _compute_website_url which
a slugify of the display_name of the event.

opw:804118
2018-01-09 09:59:09 +01:00
Christophe Simonis 362f0489d0 [MERGE] forward port branch 11.0 up to fe22a0f9ca 2018-01-03 12:28:52 +01:00
Martin Trigaux cab7e0d204 [FIX] *: add missing space in multilines messages
Courtesy of @Yenthe666
2018-01-03 11:09:09 +01:00