Commit Graph
1615 Commits
Author SHA1 Message Date
Xavier Morel 7065ea520c [FIX] *: various docstring formatting issues
Would yield block quotes instead of code blocks or lists or whatnot.
2019-02-18 08:56:07 +00:00
Christophe Matthieu b49745e52d [IMP] web_editor: lazy load the wysiwyg
Issue: wysiwyg asset slow down the loading of the website, error
inadvertently introduced: https://github.com/odoo/odoo/pull/29775

The assets are now loaded assynchroneously, when the editor is needed,
its assets will be loaded.

closes odoo/odoo#30700
2019-02-14 15:11:19 +00:00
Christophe Simonis 4400cce820 [MERGE] forward port branch saas-12.1 up to 4524ad06a8 2019-02-04 13:27:22 +01:00
Christophe Simonis 2f118c41fb [FIX] web,mass_mailing: adapt forward-ported tests to new version 2019-01-31 18:10:02 +01:00
Christophe Simonis f927c68ddb [MERGE] forward port branch 12.0 up to cb8fefa899 2019-01-31 16:59:58 +01:00
Martin Trigaux 83b37a8004 [FIX] mass_mailing: support partner_id field
A sale.order is an authorised model for mass mailing but it does not have
an email or email_from field.
When trying to send a mass mailing campaign on sale orders, an error was raised
as sale_order.email_from does not exists

closes odoo/odoo#30220
2019-01-30 10:26:51 +00:00
Christophe Simonis bdfef60d60 [MERGE] forward port branch saas-11.3 up to cd5c8a02f9 2019-01-29 18:35:14 +01:00
Christophe Simonis cd5c8a02f9 [MERGE] forward port branch 11.0 up to 36d96e0150 2019-01-29 13:17:12 +01:00
Odoo Translation Bot fe36bff420 [I18N] Update translation terms from Transifex 2019-01-27 01:37:55 +01:00
Odoo Translation Bot 127fdea764 [I18N] Update translation terms from Transifex 2019-01-21 17:38:09 +01:00
Martin Trigaux 1e224d244c [I18N] export 12.0 source terms
Mostly following changes at 7f8631a913

closes odoo/odoo#30072
2019-01-15 15:15:34 +00:00
Lucas Perais (lpe) ac7a02d60a [FIX] mass_mailing: unsubscribe page clearer
When arriving on the page to unsubscribe from mailing lists,
it was unclear whether the checkboxes were to mean "unsubscribe to this list"
or "subscribed to this list"

With a little string helper, it is clearer

OPW 1922308

closes odoo/odoo#30227
2019-01-15 13:44:18 +00:00
Odoo Translation Bot 652cecffde [I18N] Update translation terms from Transifex 2019-01-06 01:32:05 +01:00
Christophe Simonis a337b9ec92 [MERGE] forward port branch 12.0 up to f854e01a98 2019-01-18 14:26:33 +01:00
Martin Trigaux bfe1e20d6b [I18N] export saas-12.1 source terms
To reflect fixes at ec2263080a and cd4080839f

closes odoo/odoo#30253
2019-01-16 10:35:49 +00:00
Martin Trigaux af69902ecc [I18N] export saas-12.1 source terms
closes odoo/odoo#29730
2018-12-24 11:07:31 +00:00
Odoo Translation Bot 91382f691d [I18N] Update translation terms from Transifex 2018-12-30 01:30:16 +01:00
Christophe Simonis f351dd8cab [MERGE] forward port branch 12.0 up to 047e2b28de 2018-12-12 11:38:25 +01:00
Odoo Translation Bot b234af04c1 [I18N] Update translation terms from Transifex 2018-12-24 12:51:19 +01:00
Odoo Translation Bot 47aae6faba [I18N] Update translation terms from Transifex 2018-12-23 01:29:13 +01:00
Odoo Translation Bot ec4ee14c89 [I18N] Update translation terms from Transifex 2018-12-09 01:16:26 +01:00
Martin Trigaux fa98749154 [I18N] export 12.0 source terms
Update to reflect the recent code changes

closes odoo/odoo#29636
2018-12-19 08:50:10 +00:00
Odoo Translation Bot 3ce5c8bebd [I18N] Update translation terms from Transifex 2018-12-16 01:18:51 +01:00
Odoo Translation Bot 1208ac6ce3 [I18N] Update translation terms from Transifex 2018-12-02 01:25:05 +01:00
Christophe Simonis e1f9499d26 [MERGE] forward port branch 12.0 up to 053bb45706 2018-12-05 18:46:15 +01:00
Jeremy Kersten c2d83973ea [FIX] mass_mailing: don't short url before rendering
Before this commit, if you generate the href with jinja/mako syntax,
the un-rendered url will be shortened.

So:
    href="https://www.odoo.com?id=${object.id}"
will become:
    href="https://www.odoo.com/r/asw"

where
   https://www.odoo.com/r/asw
redirect to
   https://www.odoo.com?id=${object.id}
instead of
   https://www.odoo.com?id=1

Adaptation of #28540 for 11.0 version.

opw-1903803
closes #29083
2018-11-28 10:21:11 +00:00
Odoo Translation Bot ebbb5b8d37 [I18N] Update translation terms from Transifex 2019-01-27 03:14:28 +01:00
Christophe Simonis ce4cc24621 [MERGE] forward port branch 12.0 up to 82a1e1dcc3 2018-11-29 20:06:16 +01:00
Thibault DelavalléeandKishan Gajjar ec88479048 [IMP] mass_mailing: improve UTM display on mailings
This commit is the community commit linked to an enterprise improvement of
marketing automation. In this commit we simply improve display of UTM
information on mass mailings.

This commit is linked to task ID 42548 and PR #28500.

Co-Authored-By: Kishan Gajjar <kig@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2018-11-23 13:34:15 +00:00
Christophe Simonis 7a0243ec15 [MERGE] forward port branch 12.0 up to b3052b690f 2018-11-23 12:11:32 +01:00
Yenthe V.G a5e6bf2397 [IMP] mass_mailing: Add sheet of mail.mass_mailing.tag form view
closes odoo/odoo#27200
2018-11-22 10:12:48 +00:00
Odoo Translation Bot c487d2c26c [I18N] Update translation terms from Transifex 2018-11-21 09:40:22 +01:00
Olivier Dony 45aaca1d4b [FIX] mass_mailing: fix typos in 8545e05fc0
TODO: add test coverage for this computed field

closes odoo/odoo#28797
2018-11-19 13:33:44 +00:00
Odoo Translation Bot b60f9bb739 [I18N] Update translation terms from Transifex 2018-11-18 01:28:38 +01:00
Olivier Dony 8545e05fc0 [FIX] mass_mailing: fix slow contact number query
The query was computing the count for all mailing lists, not just the
one being requested. This prevents optimizing the SELECT with indexes.
In addition, using a subselect for the blacklist forced a full table
scan on the contacts - switching to a LEFT JOIN avoids that.

With a blacklist of a few hundred thousand entries, and a table of
mailing list contacts in the same order of magnitude, this brings the
SELECT from 3+ seconds down to 3 milliseconds - with the same result.

Bonus: no need to perform the regexp extraction of emails to test for
NULL values -> substring(x) is NULL iff x is NULL.
2018-11-16 16:35:22 +01:00
David Beguin 1007df3dc3 [IMP] mass_mailing : apply email_normalized on _get_opt_out_list
To avoid sending mail to an opted-out mass_mailing_contact with email address
that is not strictly an email address (a <a@a.com> instead of a@a.com),
the the get_opt_out method must be adapted to use the email_normalized field,
as this method is only useful for that specific model.

Task ID : 1896677
2018-11-20 11:37:05 +00:00
David Beguin e69b89b8fa [IMP] tools, mail : adds email normalization method in mail tools
In order to normalize email independently from the
mail.address.mixin model.
2018-11-20 11:37:05 +00:00
David Beguin fc2a8d63ee [IMP] mail, mass_mailing, mass_mailing_crm : Use normalized email in unsubscribe link
Use the email_normalized from mail.address.mixin if available to get always
a normalized email address in the unsubscribe link. That allows to simplify
the search on email address in the controllers -> Check blacklist,
send feedback, etc..

Task ID 1896677
2018-11-20 11:37:05 +00:00
David Beguin 0fe50a01d2 [IMP] mail : apply mail.address.mixin on blacklist
Apply the mail.address.mixin on blacklist mixin. So that every model
inheriting the blacklist.mixin will also inherit the address.mixin.

That simplify also the comparaison to - and the searches on - the
blacklist.

Task ID 1896677
2018-11-20 11:37:05 +00:00
Geoffroy Larue ed86434a19 [IMP] mass_mailing: improve onboarding
Purpose : this commit improve various elements of the mass mailing interface :
- make recipients field in mass mailing form required and add "mass mailing contact" in selection
- new "Archive" button and color picker in dropdown menus of mailing lists and mailings
kanban views.
- various little improvements in labels

closes odoo/odoo#28497
2018-11-15 14:32:26 +00:00
Christophe Simonis 6faad524cf [MERGE] forward port branch 12.0 up to bc744a1da4 2018-11-16 19:30:20 +01:00
David Beguin 3715104e98 [FIX] mass_mailing : returns set of normalized email in _get_opt_out_list
If a recipient has a formatted email address like 'A <a@b.com>', the returned
opt_out list must contain normalized email ('a@b.com') in order to be comparable
during the get_mail_values of the mail.compose.message.
Otherwize, It won't match.

Task ID : 1909314
Closes PR #28667
2018-11-14 11:23:44 +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
Siddarth Gajjar b43fcd6700 [FIX] mass_mailing: restore email templates
Following the new editor's merge at https://github.com/odoo/odoo/pull/29775,
the classes 'o_mail_wrapper' and 'o_mail_wrapper_td' were renamed to
'o_mailWrapper' and 'o_mailWrapper_td' because of what appears to be a
JS-variable-search-replace fail. Strange enough, the scss was not
impacted which allowed to see the bug in master.

closes odoo/odoo#30544
2019-01-25 12:43:43 +00:00
Antoine GuenetandGorash eb0ea8efbe [ADD] web_editor,*: Tests for new structure of web editor
The refactoring also had to be done in order to create a set of unit
tests.
Each behavior can be tested, including the behaviors performed as a
consequence of keyboard interactions (for instance: Enter, Tab...).
This commit also contains some changes to test_utils that were
necessary given the new structure of the wysiwyg editor.

Co-authored-by: Gorash <chm@odoo.com>
2019-01-17 08:40:21 +00:00
Christophe MatthieuandAntoine Guenet f296992317 [IMP] web_editor,*: Refactoring the wysiwyg editor and 'html' field
* Creating a new structure by transforming all the plugins in the
  library using the odoo inheritance system. Plugins are easier to
  implement with the AbstractPlugin to add Odoo behaviors.

* From now on, the methods of the library (in this case Summernote) can
  no longer be called by other modules or files. Only the wysiwyg
  widgets can access it, to simplify the updating process. The wysiwyg
  object serves as an interface.

* Depending on the options the snippets will be loaded or not, the
  editor will be in an iframe or not... all of this is transparent from
  the outside.

* Regarding iframes, all controllers related to editing have been
  removed: the new API no longer needs them. This speeds up loading,
  eases testing and removes complexity for the same
  features.

PUBLIC FEATURES

There are several public methods on the Wysiwyg class:
* Wysiwyg.prepare (WidgetParent): returns a deferred resolved when the
  library (xml, lazy, assets...) is loaded.
* Wysiwyg.getRange (DOM): returns the range (selection in the dom)
* Wysiwyg.setRange (startNode, startOffset, endNode, endOffset): creates
  a range (selection in the dom)
* Wysiwyg.setRangeFromNode (DOM, options) that creates a range from an
  element (option available to select all, start or end)

A jQuery selector was added: :o_editable, which indicates whether the
current element is editable. That is, if it is contained in a tag with
the attribute 'contentEditable = "true"' or in a tag with the class
o_editable.
Several methods are also present:
* focusIn: makes a focus and places the cursor at the beginning of the
  element
* focusInEnd: makes a focus and places the cursor at the end of the
  element
* selectContent: makes a focus and selects the content

HTML FIELD

The HTML field can receive different options:
* style-inline: {boolean} transforms a class into an inline style when
  saving and vice versa when reading.
* no-attachment: {boolean} prevents the use of attachments (in media
  dialog)
* cssEdit: {xml_id} to use a template containing the css to loaded in
  an iframe when editing
* cssReadonly: {xml_id} to use a template containing the css to load
  into an iframe when viewing in readonly
* snippets: {xml_id} snippets template (can be used with or without
  cssEdit)
* wrapper: {template} qweb static template (containing a tag:
  id = "wrapper") that will include the content during editing (removed
  on save)

MASS MAILING

A widget was created for mass mailing. There are now two fields:
body_html and body_arch.
body_arch contains the code with the class without conversion into
inline style, useful when editing and one with the inline style that is
visible in readonly mode and sent by email.
Advantage: no spreading errors, able to update css/theme, able to do
more changes when converting to inline style so that a maximum of mail
clients have an impeccable rendering.

Co-authored-by: Antoine Guenet <age@odoo.com>
2019-01-17 08:40:21 +00:00
Christophe Matthieu de444335b7 [REF] web_editor,*: Move and rename files to prepare refactoring
The refactoring of the wysiwyg editor and 'html' field allows us to
move some of the code that was in web_editor but only used in website or
in mass_mailing. Some parts are still in web_editor but will be
moved at a later time.
2019-01-17 08:40:21 +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
Thibault Delavallée b670911a92 [REF] link_tracker, mass_mailing: simplify add_click method and add tests
In this commit we rewrite a bit add_click in order to remove the inlined sudo
and ease inheritance and parameter management inside the method.

Access through controllers is sudo-ed as the main API method is now done
with current user access rights.

This commit is linked to task ID 1904277 and PR #28242.
2019-01-14 10:34:26 +00:00
Thibault Delavallée 75638ffb94 [REF] link_tracker: do not let public read technical / private link data
Link tracker models are rather technical and should not be accessed as it is
by external people. Let us delegate control to controllers and lessen a bit
model accessibility.

Currently everyone can use add_click method and generate statistics. Now
statistics will be generated only through dedicated routes. It will make
statistics more reliable and ensure technical data remain private.

Next commit will update code from controllers and main methods in order to be
have a more readable click API and avoid link between non dependent modules.

This commit is linked to task ID 1904277 and PR #28242.
2019-01-14 10:34:21 +00:00