Commit Graph
25 Commits
Author SHA1 Message Date
Martin Trigaux 553954fa82 [ADD] mail: parameter on send_mail method
To avoid to use the context to pass additional arguments just to specify
recipients or other mail.message field values.
2016-07-05 17:24:34 +02:00
Raphael Collet 8be3781501 [REM] ir_actions: remove no-longer-supported field auto_refresh from act_window 2016-06-21 17:56:56 +02:00
Christophe Simonis 1231585df1 [MERGE] forward port of branch saas-9 up to 78d20b5 2016-01-27 12:27:01 +01:00
Christophe Simonis 7e44ddcda3 [MERGE] forward port of branch saas-7 up to 6f923cb 2016-01-27 12:23:09 +01:00
Julien Legros e5e7c4c121 [MERGE] forward port of branch 9.0 up to 6872aae 2016-01-25 11:26:27 +01:00
Fabien Pinckaers 93adbe15c9 [IMP] removing disturbing tooltip when writing an email 2016-01-24 12:57:51 -08:00
Goffin Simon dc02f773ce [FIX] mail: onchange_template_id
When using context action for a template, the report was not shown in
the compose message as an attachment.

opw:657152
2016-01-21 14:36:20 +01:00
Nicolas Lempereur 6dde919bb9 [FIX] mail: don't autoescape mail subject
The mail template rendering system use "autoescape" for subject, body,
email_to, ...

Using autoescape is good for the body, but for the subject it means
variables insertions have to be marked as safe.

This commit add another environment without autoescaping enabled for the
subject field.

From https://tools.ietf.org/html/rfc2822:

  The "Subject:" and "Comments:" fields are unstructured fields as defined
  in section 2.2.1, and therefore may contain text or folding white space.

  2.2.1. Unstructured Header Field Bodies

  Some field bodies in this standard are defined simply as "unstructured"
  (which is specified below as any US-ASCII characters, except for CR and
  LF) with no further restrictions.

closes #10547

opw-659231
opw-666801
opw-665863
2016-01-20 14:13:56 +01:00
Christophe Simonis 5f997bc4ef [MERGE] forward port of branch saas-7 up to 7fa6f73 2016-01-12 16:11:28 +01:00
Christophe Simonis 7fa6f73302 [MERGE] forward port of branch 9.0 up to cb79297 2016-01-12 15:30:29 +01:00
Christophe Simonis 499c2b8da5 [MERGE] forward port of branch saas-6 up to 580389a 2016-01-08 18:26:59 +01:00
Christophe Simonis 99b6cd8119 [MERGE] forward port of branch saas-7 up to 2a834c2 2016-01-07 18:19:52 +01:00
Christophe Simonis e502b3ea1f [MERGE] forward port of branch 9.0 up to 833fe49 2016-01-06 16:09:34 +01:00
Martin Trigaux 8b4f052a38 [MERGE] Forwardport of branch saas-6 up to c649bb0df 2016-01-05 18:28:06 +01:00
Martin Trigaux e4bf03aeaf [MERGE] Forward port of branch saas-7 up to c298cf3 2015-12-21 11:37:53 +01:00
Martin Trigaux c298cf3250 [MERGE] Forward port of 9.0 up to 7892d99f 2015-12-18 16:15:08 +01:00
Denis Ledoux 4bebbfdcf5 [FIX] mail: jinja2 code compatible with wysiwyg for notifications
When editing an email template with the wysiwyg,
the `<` and `>` operators are automatically converted
to `&lt;` and `&gt;`, even for the Jinja2 conditions,
therefore breaking these conditions, and the render
of the email templates.

We avoid to use these operators in the email
template, so users can customize the notification
email template without having an advanced
knowledge on how to edit an email template containing
Jinja2 code.

Besides, the line return at the end of the email template,
just after the `% endif`,
is done on purpose as well: the wysiwyg adds automatically,
at the time of this revision,
`<p></p>` at the end of the email template source, but
this cannot be added on the same line than `% endif`,
otherwise this is considered as Jinja2 code, and it's not.

opw-659113
2015-12-10 16:58:15 +01:00
Christophe Simonis 82a495eed5 [MERGE] forward port of branch saas-7 up to 4022493 2015-12-10 13:05:58 +01:00
Martin Trigaux e3026aa0bd [FIX] typo, English
Did you missed me? That was a big one.
2015-12-04 15:06:33 +01:00
Yannick Tivisse 364b4ba06d [ADD] Add a scheduled date mechanism on email templates
And use this new features to send the email template defined in the last commit
on the module installation.
2015-11-24 18:50:27 +01:00
Thibault Delavallée 01ab75f597 [IMP] mail: notification emails with button
Notification emails have been redesigned. They notably include buttons
allowing to perform some action directly from the email.

The notification creation and sending has been partially rewritten
and improved. The purpose is to lessen the number of rendering to perform
when sending emails to recipients. Recipients are first categorized into
groups. Basic groups are partners and users. The notification template
is then rendered twice, one for followers and one for not-followers. In most
cases there will be few rendering to perform. Through inheritance it
is possible to further categorize users. For example HR users / officers
that have approve / refuse buttons in their email.

A custom data structure is used to store data about buttons and actions.
URLs, follow / unfollow are added in the structure and used in the
template to render the email for a given group.

New routes are added in mail. Those allow to perform some action, like
going to a form in create mode, following / unfollowing, executing a method,
sending a signal for a workflow. Those routes are for users only and rely
on classic access rights.

A generic route for viewing records is added. It replaces the old redirect
action. According to some specific action given by the already-existing
get_access_action, the record will be visible for everybody (forum, blog)
or restricted (going on the Inbox / login / form view, according to access
rights).

The next commit will add the various inherits necessary to add the actions
in the main addons.
2015-08-28 17:30:42 +02:00
Thibault Delavallée 63f435a1d0 [FIX] mail: mail_template: fixed create_action method that creates the
more menu action linked to an email template.

[TESTS] mail: added a test for this method.
2015-05-19 16:05:33 +02:00
Jeremy Kersten a50479db77 [FIX] mail_template: use old api for context_timestamp
New api take (record, timestamp) as param.
So cr was the record, and uid the timestamp...
2015-05-08 19:28:27 +02:00
Thibault Delavallée 53e1fc5d87 [FIX] mail: mail_template: issues linked to the migration
- do not browse a browse record
- removed onchange from the form view, as they are managed directly by the new API
2015-04-29 17:20:12 +02:00
Thibault Delavallée 4a975f1b7d [MOV] mail: moved files according to the new module organization 2015-04-27 12:52:45 +02:00