Commit Graph
32 Commits
Author SHA1 Message Date
Renaud Thiry 87b0189ff1 [IMP] mail: remove default logo
Many templates use the company logo that is set by default on
database creation. As that logo is clearly a placeholder and the user
isn't necesserely prompted to update it. It's possible for a user to
inadvertently start sending emails with "your logo" placeholders
plastered all over.

This removes the default logo of the company and removes it from
templates conditionally.

The logo isn't simply replaced with a transparent PNG as the templates
set a fixed height for the logo, which would look weird.

task-3067315

Part-of: odoo/odoo#106307
2023-04-24 10:20:12 +02:00
Nasreddin Boulif (bon) c2f89c7bbb [FIX] auth_signup: escape double quotes in email from value
Steps to reproduce:

  - Install "Sales" module (for test purpose)
  - Change company name to `בונז " ור מונד` (notice the double quotes)
  - Go to "Settings > Users & Companies > Users"
  - Select any user and then click on "send an invitation email" button
  - Go to inbox and check the email

Issue:

  No email received (at least not in main inbox).

Cause:

  The email is not received in main inbox (Gmail or Outlook might flag
  them since email from is not well parsed) because the `email from`
  value is not escaped properly (by escaping the double quotes).

Solution:

  Instead of using the company name (that is not escaped) and email to
  build the `email from` value, use the company email_formatted value
  instead (and fallback on user mail if not available).

opw-3097910

closes odoo/odoo#114534

X-original-commit: 0c4cb5e3cc2758cb27e94ecbbcfaa734ba5a50eb
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-07 11:11:51 +01:00
Dossogne Bertrand 7c4da16b59 [IMP] mail, various: improve mail template usability
Allow our users to modify mail template more easily

- make the list accessible from the settings
- give them a link to update relevant views to update header/footer
- make the list and form of templates more readable
- add a description on templates, allowing to describe their usage

In order to better filter templates, a new category field is added that
is computed based on active flag, description being set and the template
having an xml ID. Master templates are active, with a description and an
xml ID.

Update master data to add description on some templates.

task-2944770

closes odoo/odoo#101730

X-original-commit: dfa867343ee8842f3f127ac62584fd471b41dde1
Related: odoo/enterprise#32079
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-04 09:55:46 +02:00
Thibault Delavallée e401ec18ad [IMP] auth_signup: remove colored background on emails
Purpose is to have a white background like templates used in SO, invoices, ...

Task-2712450 (Mail/Sale: Improve 'Pay Now' notification template)

Part-of: odoo/odoo#82167
2022-01-31 17:47:34 +00:00
Nicolas Bayet 4813f42997 [IMP] mail,*: replace jinja with qweb
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment

By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).

There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).

We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.

To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.

This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
  (for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
  in order to see only one at once
- a floating select input to switch visibility of a particular logical
  branching

Task-27033

X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
2021-09-28 23:42:54 +00:00
Julien Banken fbaf666f6f [IMP] portal,auth_signup: improve the invitation portal email
This commit will improve the wording and the layout of the invitation
email sent to the users getting access to the portal. The signup link of
the email will now be a button that emphasizes the call-to-action.
We will also provide in the email another link that will allow the user
to access the login page. This commit will also improve the wording of a
placeholder in the portal backend.

task-2573334

closes odoo/odoo#74210

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-07 11:34:56 +00:00
Romain Derie 92175d3341 [IMP] *: replace web.base.url ICP by helper method
Previous commit introduce an helper to get the most suited URL for a record
instead of always using the ICP, which is not correct in a website context.

This commit replaces calls to ICP by the helper method.

Community: https://github.com/odoo/odoo/pull/68201
Enterprise: https://github.com/odoo/enterprise/pull/17538
Upgrade: https://github.com/odoo/upgrade/pull/2372

task-2476101
2021-06-02 10:04:29 +00:00
Thibault Delavallée 6c6adbad66 [MOV][IMP] auth_signup, calendar, gamification: reorganize qweb / jinja templates used for mailing
PURPOSE

Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.

SPECIFICATIONS

  * move those templates in their own file to ease their discovering and
    maintenance;
  * put them into data (as those are not views even if it contains qweb)
  * guidelines are now :

    -> Qweb templates should be in data/mail_templates.xml;
    -> mail.template records should be in data/mail_template_data.xml;

  * put their declaration in no update when not done if template has no
    technical code or complex dependency on underlying code;
  * move found mail data (mail.message.subtype or mail.activity.type) records
    in a mail_data file that should contain only "core" records linked to mail;

LINKS

Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#1936
2020-11-25 12:31:10 +00:00
mcm-odooandThibault Delavallée de1743ab12 [REF] mail, various: remove user_signature field from mail.template
RATIONALE

Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case

  * using the template in the composer on a single record: it is displayed
    in the rendered template in the composer, meaning people could change it.
    This behavior is interesting as it allows to see the email content;
  * using the template in the composer in mass mail mode: it is not displayed
    as only the raw jinja is displayed. It is therefore not obvious that it
    will be appended to the body of the mail. People could add it manually and
    have 2 signatures as a result;

A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.

Behavior will therefore be

  * use a template -> specify signature usage in it manually through jinja;
  * do not use a template -> signature added in sent emails;

SPECIFICATIONS

Remove user_signature.

Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.

Quickly clean some signature integration.

LINKS

Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761

Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-02-11 14:01:13 +00:00
Thibault Delavallée 1838191eec [REF] mail, various: improve mail creation calls, notably author and email from default computation
Purpose of this commit is to correctly compute author_id and email_from
in mail_message and mail_mail as they depends from each other. Moreover it
is a good idea in various flows to specify email and author when giving
creation values to avoid default computation that is not always guaranteed to
be accurate notably when involving super user.

Mail message creation could lead to desynchronized values between author
and email_from. This is improved with this commit by correctly inheriting
from default_get and computing both of them at the same time instead of having
two default values. Indeed they depend on each other.

Same thing is done for mail composer. Mail Thread offers a tool method to
find email_from / author_id based on having one of those values or current
user and it is called whenever necessary.

Some calls to mail template send_mail are also cleaned.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +00:00
Parth Choksi d59fd862f1 [IMP] auth_signup : send a reminder for pending users
Purpose of this commit is to send a mail template to the user
who invited other user(s) in Odoo.

It informs the user about the details of user(s) who have been
invited by him but have still not registered after the given days
of creation (default set to -> 5days)

task-1912449
Closes #31582

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-10 15:12:02 +00:00
Juhil Somaiya 1414470d34 [IMP] auth_signup: reset password settings should be enabled by default
As it's easy to forgot user's password and if user do,
user currently have no way to reset it if user didn't activate
the settings to enable the Reset Password.

so enable this options by default to avoid people getting blocked
because they forgot their password.

task-1925281

closes odoo/odoo#30391

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-24 11:14:07 +00:00
Thibault Delavallée 678e04c19d [FIX][IMP] various: improve lang computation in mail templates
Purpose: add lang definition on templates where it is missing

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00
Thibault Delavallée 0b74c9ab6e [FIX][IMP] various: improve recipients computation in mail templates
Purpose: use more email_formatted when possible, clean and simplify
email_from, email_to and partner_to computation.

Next step is to try to extract some common patterns in tools or methods in
order to simplify template creation and customization.

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00
Toufik Ben Jaa 4a13d5d1f5 [FIX] auth_signup: typo in invitation mail
closes odoo/odoo#32049

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-22 13:03:12 +00:00
Fabien Pinckaers 7c8ab8a574 [IMP] base: improve kanban of modules, cards not clickable (top-right menu)
[NEW] base: show enterprise module, with an 'upgrade' button
[IMP] *: some modules renaming, and improved copywriting of manifest
[IMP] *: utm on links to odoo.com
2018-08-06 00:29:51 +02:00
Shubham Johar 51ef4b8ea3 [IMP] auth_signup: Set activation_scope at 'B2C' by default
Purpose
=======

More and more features redirect to the portal (see & pay
quotations, invoices, etc.) with anonymous access by default
you can't sign up to the customer portal, while you see
a Sign in button. It's frustrating.

The ability to create a customer account is a nice service,
useful in any business willing to engage with returning
customers. This should be the default value

Specification
=============

Activate B2C portal by default. We have to create an
ir.config.parameter for the change to be immediate after
the installation. Otherwise the admin has to go and save
its res.config.settings one time before it's effective.

Task ID: 1841514
2018-07-31 12:37:50 +02:00
Dipalee Bhalodia fa9382a33c [IMP] auth_signup: make templates more modern and updated with Odoo guidelines
In this commit we improve templates used in auth_signup. Purpose of this commit
is to have templates that embed or use standard Odoo email layouts to make
them look modern and have a common style across all emails.

Main guidelines

 * better use of div / p / br to try to lessen layout issues, especially
   when updating templates using the editor;
 * correctly sequence the templates fields definition;
 * correctly set templates values notably auto_delete and user_signature
   fields to avoid confusion;
 * correctly layout the email content using light notification email. It
   can either propagate the layout choice through various send mail methods
   or directly embed the styling in the templates for more technical or
   complex templates;
 * use email_formatted computed field when possible to avoid having hand-made
   from / to addresses;
 * fix various typos and improve subjects when necessary;

Content of emails is not necessarily updated as the purpose of this task is
about styling, not content itself.

This commit is linked to task ID 1843361 (and 1868112) and to PR #25299
(and #25889).
2018-07-24 15:33:22 +02:00
Christophe Simonis f36e6917bd [MERGE] forward port branch saas-11.3 up to 37eed7c509 2018-05-29 17:34:43 +02:00
Siddarth Gajjar aa54457fe8 [IMP] auth_signup: make password set template a catchy first contact template
I think spec is pretty clear: "The current email to invite new users is poor
and not catchy! Such email is the first contact with Odoo for most users. It
needs to be perfect!""

This commit is related to task ID 1839609. Closes #24576.
2018-05-28 13:29:57 +02:00
Christophe Simonis 644f0959d0 [MERGE] forward port branch saas-11.2 up to 1655202924 2018-05-17 14:23:37 +02:00
Olivier Dony cdabb9d74c [FIX] auth_signup: remove password from welcome message
Revision 054c68689b added by mistake the
password of the new user in the welcome message that is sent to users
who signed up with an invitation token.

There is no need for this, the user has just chosen their password, and
we should not send them a copy which could be compromised on the way to
their inbox or later in their inbox.
It may also give users the impression that their passwords is stored in
cleartext in the database, even when that is not the case.

This patch minimalizes changes to the template and its translations.
For existing databases where the code is updated without re-syncing the
template, the password will simply be missing in the message (until a
resync of auth_signup module is done)
2018-05-16 12:17:14 +02:00
Rohan Patel e3afd5508c [MOV] auth_signup, base: move portal user template to base module
Purpose of this commit is to standardize portal user behavior and creation.
As all portal required features (user, group, support) have moved to
base let us move the template user used to create portal users to base.

'Portal User Template' is therefore moved from auth_signup to base module.
Various config parameters are updated due to the change in xml id.

This commit is related to task ID 31399 .
2018-03-15 11:34:41 +01:00
Denis Vermylen 054c68689b [IMP] auth_signup: various usability improvements in signup process
* allow new signup on invalid token
 * relabel signup buttons
 * send a welcome email upon signup with a signup token.

This way, should the token somehow be usurped by someone else,
the original partner's email address will be notified.
(before the usurper can change the email)
2017-07-06 12:53:39 +02:00
Christophe Simonis 6441ea28b3 [MERGE] forward port branch 10.0 up to cc7ae17bd5 2017-05-02 18:12:09 +02:00
Christophe Simonis cc7ae17bd5 [MERGE] forward port branch saas-11 up to 73527d0fc6 2017-05-02 17:05:42 +02:00
Christophe Simonis 73527d0fc6 [MERGE] forward port branch 9.0 up to c66e454f06 2017-05-02 16:17:35 +02:00
Mansi Gandhi 5cb307170d [IMP] base, auth_signup: rename technical users to avoid confusion
* default user > Default User Template
 * Template User > Portal User Template
2016-11-09 10:48:33 +01:00
qsm-odoo fb363b572b [FIX] *: adapt odoo interface violet
Change color #a24689 to #875A7B

Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).

Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
2016-10-05 10:29:00 +02:00
Thibault Delavallée 029d1baf35 [REF] mail: remove required alias on users
This commit remove required alias on res.users model. It also removes the
inheritance of mail.alias.mixin. The field alias_id is kept and allow people
to use aliases on users if they want. However there is no default void alias
created for each user anymore.

Default from of mail.message does not use user alias anymore. Indeed this
creates issues with aliases not being correctly configured and can be
confusing compared to private channels. Using user aliases is therefore
now done manually instead of being a default behavior.
2016-09-01 13:19:24 +02:00
Kinjal Mehta 416903d1b9 [MIG] auth_signup: Migrated into new api. 2015-12-16 13:39:41 +01:00
Kinjal Mehta 327de507a7 [MOVE] auth_signup: Moved files in related models and views directory. 2015-12-16 12:20:41 +01:00