Commit Graph
16 Commits
Author SHA1 Message Date
Louis Wicket (wil) 9afe7c74c9 [IMP] *: remove "French spacing" 👺
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#114533

Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-14 15:52:10 +01:00
Stefan-Calin Crainiciuc (stcc) 62a71da538 [FIX] mass_mailing*: made demo mailing editable
*: _sale, _crm

Steps to reproduce:

- install Email Marketing
- duplicate an existing demo template
- edit > drag a block from the editor onto the email

Issue:
`Traceback: Uncaught Promise > Cannot read properties of undefined
(reading 'droppable')`

This happens because the email templates are not editable, which means no dropzones can be attached to them.

Solution:
Add classes 'oe_structure' and 'o_editable' to one div in the
templates so that at least one dropzone can be created.

opw-3050732

closes odoo/odoo#111161

X-original-commit: 5f19f9c33656d8b38e827383e0dc8d65e5ebad2a
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
2023-01-26 22:09:53 +01:00
Thibault Delavallée ab3497b889 [FIX] mass_mailing(_*): avoid sending fake emails
Some demo mass mailings are currently defined as being "in queue" in demo
data. This means they are about to be send by the mailing cron.

However we don't want demo data to send emails as

  * most of those emails are fake (e.g. targeting example.com);
  * real emails should not be sent (e.g. having by mistake a real email that
    will be spammed);
  * statistics resulting from those emails will not have any wow effect;
  * on SaaS this consumes email quota, and produces quite a big volume of
    unnecessary emails when people try the 16.0 version;

It is better to either have demo data of mailings done with traces, or keep
other mailings in draft. Otherwise the cron will send them. Flagging those
mailings is difficult, as emails are sent asynchronously and not during
install or update.

Even if this may lessen wow effect of some kanban view, better move mailings
currently "in queue" to "draft".

closes odoo/odoo#107904

X-original-commit: 0e11f4926be1800fc2b58feedcd81df24720ec19
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-14 07:49:03 +01:00
Florian Charlier 992dfc4312 [FIX] mass_mailing_crm: fix link in demo data
So that the link works...

Task-2954531

closes odoo/odoo#98310

X-original-commit: 617a4b8245315cbd47f83bed3e2ad74b105b5975
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-17 22:52:17 +02: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
Thibault Delavallée c8aabac87d [IMP] mass mailing: update reply_to_mode keys
Propagate reply_to radio keys (update and new) to mass mailing in order to have
a coherent naming (was thread and email). This naming is also coherent with
gateway naming (message_update and message_new).

LINKS

Task ID-2117639
COM PR odoo/odoo#40931
ENT PR odoo/enterprise#17941
UPG PR odoo/upgrade#2419
2021-04-26 14:18:33 +00:00
Victor Feyens d4e0fe018d [IMP] *: use ref= instead of eval="ref(' in xml field tags.
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 13:07:06 +00:00
laa 69b3b4bcd6 [FIX] mass_mailing: edit text content and transform the form tag view
- correct some errors in the text field
- transform the utm.tag.view.form view to utm.tag.view.tree view to allow direct tag editing

closes odoo/odoo#37008

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-17 12:01:11 +00:00
qmo-odoo a661b00015 [REF] utm,mass_mailing: replace mass mailing campaign by utm campaign
PURPOSE

This commit removes the mass_mailing.campaign model. Instead of having a fully
fledged model, we will simply inherit utm.campaign. We will also add relevant
statistics on utm campaign model in order to use it in various applications.

SPECIFICATIONS

This commit removes the mass_mailing.campaign model. Instead of having a fully
fledged model, we will simply inherit utm.campaign. This change implies that
mass_mailing.tag and mass_mailing.stage have to move to the utm model along
their associated views/data.

These changes were made so that campaigns could be used in the future
by social, mass_mailing and mass_sms and available in the same view

This commit also removes the source_id and the medium_id
fields on the campaign.

This commit also moves the unique_ab_testing field from the mass_mailing_campaign
to the mass_mailing model

Task ID: 2002029
PR: #34015
2019-08-02 12:32:35 +00:00
Thibault Delavallée 49d2899fbd [REF] mass_mailing: rename mail.mass_mailing model
PURPOSE

Mass mailing is currently a bit messy. As SMS will be added as a way to notify
people in mass through SMS let us take this opportunity to somehow clean this
application: organization, light code cleaning, model renaming.

SPECIFICATIONS

Rename mail.mass_mailing model to mailing.mailing. Rationale :

  * mailing is now a prefix for mass mailing models;
  * mailing.mailing is easier to read / find / understand;

Note that mail.mass_mailing.campaign is not updated as it is likely to be
removed soon and replaced by simple utm.campaign model.

MIGRATION

mail.mass_mailing model -> mailing.mailing
mail_mass_mailing table -> mailing_mailing

LINKS

Task ID 2037906
Preparing task ID 1997464 (SMS addition in mass mailing)
PR #34938
2019-07-17 15:50:33 +00:00
Thibault Delavallée 20dfba6e11 [FIX] mass_mailing: fix management and propagation of UTMs
PURPOSE

Mass mailing is currently a bit messy. As SMS will be added as a way to notify
people in mass through SMS let us take this opportunity to somehow clean this
application: organization, light code cleaning, model renaming.

SPECIFICATIONS

Fix UTM management and propagation in mass mailing.

Right UTM definition in mass mailing

  * mass mailing campaign -> utm.campaign
  * mass mailing -> utm.source
  * "email" -> utm.medium

Therefore

  * remove campaign setting source and medium as each mailing is a source
    and medium is "email";
  * ensure each mailing is a separate source (otherwise name is shared);
  * ensure UTM values propagate to link creation are those values and not
    the one coming from the mass mailing campaign;

LINKS

Task ID 2037906
Preparing task ID 1997464 (SMS addition in mass mailing)
PR #34938
2019-07-17 15:39:06 +00:00
Christophe Simonis cf52a04979 [MERGE] forward port branch saas-12.1 up to d3b8422c9c
closes odoo/odoo#30614
2019-01-28 13:58:11 +00:00
Martin Trigaux 0ecaf53726 [FIX] mass_mailing_crm: add missing tag in template
There is already a %endif tag but no matching % if
The template failed to render, unexpected tag endif

closes odoo/odoo#30210
2019-01-15 08:23:47 +00:00
Thibault Delavallée f50fbc6d16 [IMP] mass_mailing: differentiate mailing name from emails subject
Purpose of this task is to allow marketing people to differentiate the
mailing name (internal reference) from the subject used in the mailing
emails.

Mailing name is actually the UTM source name as mass mailing inherits
from it. Being able to edit it independently from the subject allows
to better categorize / filter mailings without sending technical terms
to customers. Marketing users could also change and tweak mailing subject
without disorganizing the pipe and changing the URM source name.

Demo data are updated accordingly to have both subject and mailing
names.

This commit is linked to task ID 1917602 and PR #29514.
2019-01-17 10:33:07 +00:00
Xavier Morel e1837721a8 [FIX] *: reassociate various demo data to admin instead of root 2018-09-24 15:55:06 +02:00
Thibault Delavallée f028ba56d1 [ADD] mass_mailing_crm: add UTM statistics on mass mailing linked to lead/opportunities
Purpose: better showcase the integration between email marketing and crm
application thanks to UTM links.

Specifications

 * add 2 stat buttons to the mass mailing form;
 * XX Leads -> redirects to lead list view (should include both types: leads
   & opportunities), only visible if Leads are activated in CRM settings;
 * YY Opportunities -> redirects to opportunities list view (only
   opportunities);
 * those stats buttons are linked to UTM trackers used in the mass mailing
   itself: campaign, source and medium. Those can be configured notably using
   the website_link module;
 * display the stat buttons even if no data;
 * update demo data;

This commit is linked to task ID 1872198 and PR #26188.
2018-08-09 13:30:28 +02:00