Commit Graph
242 Commits
Author SHA1 Message Date
Antoine Guenet 6ce790612c [FIX] mass_mailing, web_tour: skip a unsuitable parent for the tour tip
This makes it possible to declare an element unsuitable as parent of the
tour tip via the "o_forbidden_tooltip_parent" class.
We then apply this class to the "o_we_customize_panel" of mass_mailing's
snippets menu so the tip is applied to its parent like in saas-14.2.
Without that, the tip is hidden by the body of the mail. The reason it
was positioned in the parent in saas-14.2 is that the theme selector
wasn't in the customize panel but positioned absolutely above it.
This is an ad-hoc fix to something of an ad-hoc situation, given the
relative weirdness of the html environment (the snippets menu is in the
padding of the body of an iframe).

closes odoo/odoo#69876

X-original-commit: 58d5af5df81926af1a5715dd57f6b5c3b40b1e16
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-27 06:29:20 +00:00
Sébastien Geelen (sge) 1158e7f99f [FIX] web_editor, mass_mailing: remove snippets from plain text mail 2021-04-23 12:18:04 +00:00
Antoine Guenet 65800bcfa5 [FIX] web_editor, mass_mailing: restore missing html edition feature
closes odoo/odoo#69324

X-original-commit: 8e4d0c43eac15718df45b32738d7eb46be426652
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-15 14:00:39 +00:00
Sébastien Geelen (sge) 92d0713478 [IMP] web_editor, mass_mailing: activate undo/redo button in mail edition
closes odoo/odoo#68912

X-original-commit: 2b12674fcfdebf362e5bd806bc8374d82c30de82
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-07 15:44:43 +00:00
740168ce8d [REF] web_editor, website_*, mass_mailing: adapt to Odoo Editor
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Sébastien Geelen <sge@odoo.com>
Co-authored-by: Emilien Durieu <edu@odoo.com>
2021-04-01 16:01:06 +00:00
Julien MougenotandSimon Genin a3373db4b8 [REF] mass_mailing: clean up assets views
This commit handles 2 things:

- Clarifies why some inline style has to remain inline instead of being moved
to a separate file.

- Moves an inline modification to field_html for testing purpose to
a dedicated file.

This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:17 +02:00
Nicolas Lempereur 09e5b712ef [FIX] mass_mailing,web_editor: content no under sidebar
Depdending on situation several fixes (f885202, fc8e446) leads to issue
in small screen size:

- in iframe editor with without snippets => the width of the content is
  decreased of several times the sidebar that is not shown

- in editor with sidebar => the content gets behind the sidebar

With this changeset we remove part of the above commits which seem to
fix both issue.

note: this also fixes that the mass mailing content applied CSS should
not depend on screen size, or what is send would differ dependin on
which screen size clicked on SAVE (on last inlining of CSS).

opw-2426400

closes odoo/odoo#66104

X-original-commit: 3e41618240036f1f47bb25b993c46b4d268031d5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-02-12 16:32:37 +00:00
Nicolas Lempereur f7364424f6 [FIX] mass_mailing: save error does not break inlining
Scenario:

- create mass mailing with icons and without title
- save and get error "The followign fields are invalid: Subject"
- fill subject and save
- edit

=> the icons have disappeared

This is because mass mailing widget is using:

- a "body_html" field that contains inlined html
- a wysiwyg editor to edit field "body_arch"
- a textarea containing "body_arch" value to be saved

When we save this happens:

1. we save the current value of wysiwyg into textarea
2. wysiwyg content is inlined (eg. transforming font in image)
3. inlined wysiwyg content is set to "body_html" field
4. if there:

   - is no error while saving => body_html and body_arch are saved and
     will be used on next edition

   - if there is an error the fields are not saved, and we now have an
     inlined content on wysiwyg, so next time we save the "body_arch" is
     going to be inlined:

     => this for example breaking the icons on edition

Issue discovered when fixing opw-2447756

closes #65208

closes odoo/odoo#65221

X-original-commit: 0f5f53837bc403960e307ab85e9fe68423c23f5f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-01-28 14:15:48 +00:00
std-odoo 9dcb196fd3 [FIX] mass_mailing: fix the mailing tour (rename the targeted button)
Bug
===
Since e598e74648 the action button "Launch"
in the mailing form view was renamed. Therefor, the mass mailing tour is
broken and need to be updated.

Task 2446835

closes odoo/odoo#65300

X-original-commit: ef0f483612316fbf354bd27a4573ec3292b94328
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-29 17:59:14 +00:00
Mohammed Shekha 706929e118 [FIX] *: update tour sequence
with this commit we are updating sequence of onboarding tours

task-2444153

closes odoo/odoo#65244

X-original-commit: a928beccb09f4db4234356e5e4f7bdf090ecc964
Related: odoo/enterprise#16026
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-01-29 09:03:08 +00:00
Nicolas Lempereur 60839ef570 [FIX] mass_mailing, web_editor: send mail to outlook and keep image size
Office Outlook doesn't take into account the [style] attribute, and it
doesn't manage width/height in percent value.

This commit set width/heigth attribute in pixels and also always set the
width/height in style attribute (keeping them in the original unit and
setting them to auto if not present).

This is a reintroduction of 2015 commit bdf58adb46

opw-2447756

closes odoo/odoo#65218

X-original-commit: c51762a790d6fefd97e6c818bfaa9307180dd5b5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-01-28 13:30:09 +00:00
qsm-odoo 16656e7113 [REV] web_editor, *: remove JW empty assets
*: mass_mailing, website

The revert of Jabberwock at [1] was made reverting all the commits
that happened during and after the Jabberwock merge. This missed a
preparation commit [2] which added empty asset files a few days earlier.
This reverts that commit.

[1]: https://github.com/odoo/odoo/commit/e5572c317a7775a58675ed73efc89b5c9f6c0c39
[2]: https://github.com/odoo/odoo/commit/55f10ac9a0bb574a893e84c3ee6237e1d439750b

closes odoo/odoo#64860

Related: odoo/upgrade#2098
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-21 13:32:10 +00:00
qsm-odoo e5572c317a [REV] web_editor, *: remove Jabberwock
*: barcodes, mail, mass_mailing, note, test_website, web, web_tour,
   website, website_blog, website_event, website_form, website_forum,
   website_mail_channel, website_mass_mailing, website_profile,
   website_sale, website_twitter, doc

New solutions are being investigated in master. For the moment, it seems
better to remove Jabberwock to unlock difficult forward-port between
14.0 and 14.1/master, until we decide what to do once and for all in
a later master. We may un-revert this later but that would be way easier
than reverting Jabberwock in a few months.

This was done as safely as possible by removing any commit related to
Jabberwock, then resolving conflicts, then reforcing commits from 14.0
that were hugely adapted for 14.1/master, then forcing the whole diff
over a rebased 14.1/master. The only possible miss (other than me making
a mistake) would be commits that were not forward-ported to 14.1 thanks
to Jabberwock handling the issue on its own (I know we had such commits
in website, which I manually included in this revert, see below).

For reference:

Commits which were reforced to their 14.0 version:
- https://github.com/odoo/odoo/commit/1a916fc2362c0b006460d94a219366ade1cce058
- https://github.com/odoo/odoo/commit/fd9e58a675bb7ec1bf97cb77b21b3c65369d51fe
- https://github.com/odoo/odoo/commit/bdfddace29b16404c06a7ebfc0cc242463a0e768
- https://github.com/odoo/odoo/commit/42b3ad10e0b32b7fc72f801e2c67d6baf938c566
- https://github.com/odoo/odoo/commit/710784da1f02d45cbe898da426ba7e2ac63dc711
- https://github.com/odoo/odoo/commit/597585c9b8b1350bcfd84e8433ea6c82060bcc3d
- https://github.com/odoo/odoo/commit/333a9124608ff655bd9ad5e63044a5cb7ef9c636

Commits that were not forward-ported to 14.1/master and now are:
- https://github.com/odoo/odoo/commit/55ff2d971b672dec5f103215be39101c88856b6c
- https://github.com/odoo/odoo/commit/ebbb3de1e5f363689a5ba1647bb4c26416e42d5b

+ Adapt this forward-port: https://github.com/odoo/odoo/pull/60976 (as
  it was simplified for non-stable master version relying to the
  Jabberwock implementation and now needed to be adapted to the
  summernote implementation).
  See `!$el.data('oe-expression') && $el.data('oe-xpath')`

+ Revert https://github.com/odoo/odoo/pull/60477 and reforce original
  14.0 fix https://github.com/odoo/odoo/commit/746bf53b4aecfc601f0581a948d7cb7153812c82

Note: this also means that any good refactoring that was done by the
Jabberwock-related commits is lost for now. Once the revert reaches
master, I'll try and restore what we want from those commits. Here
are their references (but obviously they have the opposite conflicts
than those resolved during this revert):

e766842a92b6 [REM] web_editor,website: empty summernote files
08c94c986e09 [REF] web_editor,web: adapt to new jabberwock editor
1546c1b74713 [REF] mass_mailing: adapt to new jabberwock editor
fd0b963c6028 [REF] website: adapt to new jabberwock editor
0113d05c6c94 [ADD] web_editor: add new Jabberwock editor lib
d0c88a396493 [FIX] web_editor: don't change background color out of the website editor
d52d3d67d4e1 [FIX] web_editor : better icon in text style dropdown
61cb2f0d21da [FIX] web_editor: should not ask if want to leave the page twice
c42012b863b5 [FIX] web_editor: trigger a resize when use the mobile preview
d934d05d6e39 [FIX] web_editor: need to build the snippet before commit it into vDom
495bea924745 [FIX] web_editor: remove box shadow on the #wrap container
bffb5612e689 [ADD] field_html: add resizer in most field_html
f3c94e40cccf [IMP] web_editor: update Jabberwock library to commit 41e4063
cc87dea3ef32 [FIX] web_editor: update header change position to work with JW
5d9b25f66704 [FIX] web_editor: do not insert chars around step icon on click
70d3f0e4630c [IMP] web_editor: update Jabberwock library to commit 0bd94881
a57f13891f82 [FIX] web_editor: open media modal in appropriate tab on dblclick media
5b7537397e08 [IMP] web_editor: update Jabberwock library to commit a7ba7c34
a8d7ec235eeb [FIX] web_editor: adapt iframe Qunit test to new editor
5f794eac7209 [FIX] mass_mailing: hide all panels on show themes
551d45641d19 [IMP] website: remove unused reference
10580e1c102f [IMP] wesbite: add comment in tour
c17049f6b764 [FIX] web_editor: Fix description toggle in pricelist snippet
18a428e854b1 [IMP] web_editor: update Jabberwock library to commit 43a10003
58a161c645a5 [REF] web_editor, website: use editor helper setClass
62dd0bd3bc66 [FIX] web_editor: properly deactivate snippets and reactivate the last
99eebcaa34cb [FIX] web_editor: disable snippet in preview mode on mouse leave options
a84216932958 [FIX] web_editor: fix the image gallery snippet
f8dd4ea3e7d5 [FIX] web_editor: fix shadow selector for Safari
e50a4f3a16de [IMP] web_editor: update Jabberwock library to commit de13ed7e
4a2718f7a5ba [FIX] web_editor: ensure dom is properly cleaned at end of save test
03684c004a4e [FIX] website: ensure reset of bg-image on add bg-video
d63397159708 [FIX] web_editor: fix image remove from images wall
82fa5142f1a5 [IMP] note: restyle note without sheet or resizer
8b9f1ce603d5 [FIX] web_editor: properly mock createWysiwygIntance (sic) in tests
fc2183b66305 [FIX] web_editor: image overlay did not update with changes
cd0d2f5791cd [FIX] web_editor: add color preview to color picker
28a168172454 [FIX] web_editor: restore removal of spinner
67c90dd3b946 [FIX] website_forum: properly initialize editor
920dfe2a430a [FIX] website_forum: better css in the JW toolbar
43f33fd651af [IMP] web_editor: update Jabberwock library to commit 6853b60
71246c92f8de [FIX] Web_editor: table options button should be inside the toolbar
12b9e5916692 [FIX] web_editor: properly update the image options on replace image
e889cf8583da [FIX] website, website_sale: properly save filter id of dynamic snippets
e0fd11e36e45 [IMP] web_editor: update Jabberwock library to commit 4b2c903b
8f2b7ba35614 [FIX] web_editor: properly stop snippet option changed event propagation
a30c2c4105c7 [FIX] website: fix megamenu snippet editor behavior
312091cf822b [FIX] web_editor: fix overlay that is not reappearing
9f1d03dda613 [FIX] web_editor: table picker not fully displayed
814ddada6124 [IMP] web_editor: remove message before leaving page if editor is destro
4f38e26af7da [FIX] web: allow saving copyright footer
01e947b6123b [FIX] web_editor: only save translations that changed
103676072c50 [FIX] web_editor: prevent traceback on open crop dialog
5844ff66d4a0 [FIX] web_editor: apply image crop in jw on save dialog
1b435652e4a0 [FIX] website_forum: ensure media modal opens on click button
4f4a6ca0b8ac [FIX] web_editor: ensure valid default html value
51e22026ac7b [IMP] web_editor: update Jabberwock library to commit ab1184f8
2413fa19be0e [FIX] web_editor: Qunit test properly wait for editor stop
aa89e1ea3e97 [FIX] web_editor: properly save view blocks with an id
e2e90b53992e [FIX] web_editor: ensure language selector is non editable
0efd72089d5c [IMP] web_editor: clean useless lines
f54dfc7631f9 [IMP] web_editor: remove useless comment
3995ab1b84f2 [IMP] web_editor: update Jabberwock library to commit b8d73691
0834b1e5740a [IMP] web_editor: withDomMutations
f1459fb7b45c [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
6e8acc6c8cc7 [IMP] web_editor: update Jabberwock library to commit 3bbb175c
18a0c95d51cb [FIX] website, web_editor: #wrapwrap in body
4686a92e742c [FIX] website_form: allow edition of success message
78cc4da075cc [FIX] web_editor: allow edition of branded nodes only
bcffa7353448 [FIX] web: dialog should not use field value footer items
67ff56e14746 [FIX] web_editor,website_mass_mailing: display the popup preview
3cb9bea50c20 [IMP] web_editor: update Jabberwock library to commit a20492ea
518f03e6f1c9 [FIX] web_editor: use withIntangibles to find ZoneNode
d0ad6a568f49 [FIX] website: move sidebar out of theme
d690f5da13ea [FIX] website: properly save popup id
43b3433df3e6 [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
4ee8f4dedc30 [FIX] web_editor: prevent deadlock when removing child snippet of popup
850be198ef6d [FIX] web_editor: prevent traceback on reposition background image
4c3eaba41f5d [FIX] mass_mailing: adapt tour to the new editor design.
496d3ea272ed [FIX] web_editor: properly position sidebar scrollbar
5be4de703074 [FIX] web_editor: Show the toolbar when select the text in forum edition

closes odoo/odoo#63768

Related: odoo/enterprise#15458
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-12-24 13:36:49 +00:00
Gorash c9fdf4bd14 [FIX] mass_mailing: adapt tour to the new editor design.
closes odoo/odoo#63471

X-original-commit: 537914d7e74790a832f8d6c24d79ffe2fb463f7e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-16 16:07:47 +00:00
Nicolas Bayet 3fa7894106 [IMP] web_editor: withDomMutations
1) Replace editor function that change the editor internal structure
   with a new mechansim that does it automatically by observing dom
   mutations. Welcome wysiwyg.withDomMutations.

2) Add a mechanism to reuse the active editor execution context
   when a wysiwyg.execCommand or wysiwyg.withDomMutations is called
   inside itself.

   Example:

   await wysiwyg.execCommand(async ()=> {
      ...
      await wysiwyg.execCommand(()=>{...})
      await wysiwyg.withDomMutations(()=>{...})
   })

closes odoo/odoo#63237

X-original-commit: fe7056ccb450c9767693671e8d980a6aebacd6ab
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-12-11 15:32:36 +00:00
Aurélien Warnon 8cd623e1d5 [IMP] mass_mailing[_sms]: pimp mailing list views & demo data
PURPOSE

Improves various views related to the mass mailing lists to help the user to
check the "health" of its lists at a glance.

SPECS

Introduce statistic fields on mailing.list:
- Total number of contacts (replaces the previous number of valid emails)
- Number of valid email contacts
- Number of valid SMS contacts
- Number of mailings sent using the list
- Percentage (and total count) of opted-out contacts
- Percentage (and total count) of blacklisted contacts
- Percentage of contacts having at least one bounced message

The statistics are shown on the kanban and also on the form view where they are
used to quickly reach the associated mailings / contacts.
Demo data were slightly adapted to show more interesting demos on views.

On a technical point of view, the various counts of contacts are made in a
single query using CASE WHEN syntax.
We need some entry points in the query to be able to dynamically add fields and
joins in the mass_mailing_sms app, but it's better than copy/pasting multiple
times a very similar query.

LINKS

Task 2182622
UPG PR odoo/upgrade#1990

closes odoo/odoo#53221

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-02 09:39:59 +00:00
Antoine Guenet c875a163e5 [FIX] mass_mailing: hide all panels on show themes
closes odoo/odoo#60562

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-10-22 15:54:25 +00:00
qsm-odoo b31e2369c5 [FIX] mass_mailing: restore button text colors
The button text colors were forced to the default link color while that
color should only be forced for links which are not buttons.

Note: this fix will not impact existing mail templates thanks to
transcoding. That's why it is possible to fix safely in stable versions.

Part of https://github.com/odoo/odoo/pull/60308
opw-2360756

closes odoo/odoo#60308

X-original-commit: 3d8c6eca5ffa657485bdf4bec84c07b4f978a71d
Related: odoo/enterprise#14217
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-20 09:14:47 +00:00
qsm-odoo 6ce28c29db [FIX] mass_mailing: make better link dialog for mass mailing
Primary and link buttons are "hacked" by mailing themes scss. We thus
have to fix their preview if possible (as they are previewed as standard
bootstrap while they actually have a different look depending on the
mailing theme).

Note: this commit is obviously a big hack which calls for lots of
improvements in master.

FIXME: this only partially work due to the new editor, it has to be
fixed as soon as the master becomes stable again...

Part of https://github.com/odoo/odoo/pull/60308
opw-2360756

X-original-commit: 7bd7bc2513b72f5ffc006758c4bf4eb42ae6ed67
2020-10-20 09:14:00 +00:00
Antoine Guenet c748e2f76a [ADD] field_html: add resizer in most field_html 2020-10-19 13:01:23 +00:00
Gorash 3dc721ab71 [REF] mass_mailing: adapt to new jabberwock editor 2020-10-14 10:29:10 +00:00
Goaman 55f10ac9a0 [IMP] web_editor: add assets for jabberwock editor
This commit lays the groundwork for the new editor by adding empty files to the assets in
order to change them later on. The new editor is not stable enough to be merged right
now, but delaying it to 15.0 would be problematic as the current editor has many bugs that
we are unable to fix because of how summernote interacts with browser-dependent code as well
as all the hacks that were done on top of it for Odoo since 8.0.
2020-10-02 08:52:40 +00:00
qsm-odoo 48b12387d5 [IMP] web_editor, *: move the left panel to the right
*: website, mass_mailing

See parent commit for information about the scrollbar moved to the
'#wrapwrap' element, which was necessary to achieve this right panel
design. Note: in the future, having the scroll on the #wrapwrap may
not be necessary anymore as the edition might be done in an iframe.

Part of https://github.com/odoo/odoo/pull/57975
task-2344227

X-original-commit: 2abe8517063b2696cc89e9a453dcc3921fb3b8c7
2020-09-22 10:09:36 +00:00
xO-Tx 6e8f4ff3ea [IMP] sms/mass_mailing: add emojis support to the base SmsWidget
This commit adds emojis to base SmsWidget in order to use a text field with
both sms and emoji widgets in "mass_mailing_sms" module for sms content.

The emoji feature is optional (depends on "enable_emojis" attribute). To add
the emoji support, the following changes have been made:

  * override the method "on_attach_callback" from emoji widget base code to
    hide emojis if not enabled;

We also adjust the css of emoji widget to make it suitable for a text field
with sms option.

Task ID-2224393
PR #49096
2020-08-11 14:38:32 +00:00
Sébastien Mottet (oms) ac0579263b [IMP] mass_mailing: add 'view in browser' link in mailings
PURPOSE

Add a block that allows recipients to check the email in a browser in case
their mail service provider does not render it well or to see it full screen.

SPECIFICATIONS

A thumbnail has been added in the snippet thumbnails list of the mail editor.
It allows to add an header snippet. This snippet contains a link allowing the
recipient to see the mail in its browser instead of its mail client.

Add a route to display a mailing content. This route should be recipient
dependent as mailings could contain jinja markers. Using the same access token
and check as unsubscribe route this public route allows to display a mailing
content directly rendered for a given customer.

_get_unsubscribe_url method is moved from mail_mail to mailing as it does
not really belong to the mail model. Indeed it is mailing dependent.

A view URL leading to the view in browser route is added. It is managed like
the unsubscribe url: magically avoid shortening, magically rewrite when
sending email.

Task ID-2239327
PR #49886
2020-08-05 13:55:04 +00:00
qsm-odoo bb0cd4d5c8 [IMP] web_editor, *: review background color/image options UI
*: website, mass_mailing, website_blog, doc

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo f16113a06e [IMP] web_editor, *: review the editor design CSS
*: web, mass_mailing, website, website_form, website_sale

New CSS design of the editor (step 1/x).

This work is unfortunately far from perfect but is a first step towards
what we want. In particular, much CSS linked to elements that are meant
to be removed/moved in the upcoming weeks was done in a huge rush but
will thus hopefully be removed/reviewed before the 14.0 release.

As the design is now far more complex including gradients and other
"complex" elements, it was also very difficult to keep a design based on
css-variable so this system was removed, which means that the editor now
appears the same everywhere (backend, frontend, ...). The original goal
of this system was to have an adapted style for backend, frontend and
website visitors. Unfortunately, the current result was a very good
frontend editor design, a not-so-good backend editor design (for mass
mailing at least) and a totally unadapted design for the website
visitors. Making this perfect will be achievable by loading different
assets for those 3 areas and hopefully those assets will only differ by
the values of editor scss variables.

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
Samuel Degueldre aa8d2a8be2 [IMP] web_editor, *: move image optimization feature to left-panel
*: website, mass_mailing

In continuity with the nline crop, in an effort to make the image
workflow as seamless as possible in the website editor, the image
optimization feature has been moved out of the modal which could be
opened through the media-dialog and into the left panel.

This commit adds a quality slider and a width selector, as well as a
preview of the image's weight to the left panel, and removes the
image_optimize dialog.

This commit also introduces the possibility to add a color filter on
images.

Part of https://github.com/odoo/odoo/pull/51517
task-2192755

closes odoo/odoo#51517

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-05 18:11:53 +00:00
qsm-odoo 7736cde22c [IMP] web_editor, website, *: use new color names
*: mass_mailing, website_blog, website_forum, website_hr_recruitment

Deprecate alpha, beta, gamma, delta and espilon color names and now use
a new color system: o-color-x, with x from 1 to 5.

This will allow to review the colors of all themes to have nice visuals
for the new color combinations classes, without breaking the current
uses of bg-alpha, alert-delta, etc in current websites of customers
(by keeping the old color and classes for compatibility).

This will also allow to uniformize all themes under the same conventions
to enforce BS color override:
- o-color-1 used as primary (as before, for alpha)
- o-color-2 used as secondary (as before, for beta)

Before, some themes were not following the 2 guidelines. The users
using those themes will simply have the possibility to choose o-color-1
and o-color-2 colors accordingly to restore their website without
breaking the new system features.

Another change is that those colors are defined through color palettes
and not theme color palettes. This will avoid them to generate automatic
bootstrap classes which we don't want (alert, btn) and generate the one
we want by ourself.

Note: for mass mailing, the colors and classes also have been renamed
but the system stays unchanged.

Part of https://github.com/odoo/odoo/pull/45856
task-2197038
2020-06-02 09:42:19 +00:00
Jérémy Hennecart c15f9efed0 [IMP] mass_mailing: add email marketing tour
PURPOSE

Improve the Email Marketing tour and onboarding to create a "wow effect" when
users test the app.

SPECIFICATIONS

Create a tour for mass_mailing to let user visit Odoo Email Marketing through
a simple mailing creation flow.

This require the following functional changes

  * by default, if user chooses to contact mailing lists and there is a single
    mailing list available, add it as default value for chosen list;
  * create a master mailing list data containing the admin user so that he can
    easily follow the tour and test the mailing application;

LINKS

Task ID 2194876
Community PR odoo/odoo#48259
Upgrade PR odoo/upgrade#983

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-29 09:48:40 +00:00
Anh Thao Pham (pta) 3f299f237a [FIX] mass_mailing: fix untranslated text on unsubscribe page
- Install Website and Email Marketing
- Go to Settings
- Click on "Manage Languages" and activate French
- Click on "Activate and Translate" and check the websites to translate
- Go to Preferences and set user language to "French"
- Go to Website > Configuration > Settings and make sure that French is in the languages list
  and that it is default
- Go to Email Marketing
- Create a new mailing
- Make sure that current user is in the Recipients list
- Send the mailing (it will be scheduled)
- In debug mode, go to Settings > Technical > Scheduled actions to run the action manually
- Check the received mail and click on the "unsubscribe" link
On the unsubscribe page there is text that is not translated.

Some of the translations on this page is done in JS.
But the translations are not available at that moment.

The translations have to be loaded manually before letting the JS doing its work.

opw-2251235

closes odoo/odoo#51485

X-original-commit: 72a5e2b273e5faeccf49c0ef3fbb9f470e1a1c71
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-18 16:14:29 +00:00
std-odoo 3810866f69 [FIX] mass_mailing: escape the mailing list name
Task-2241443

closes odoo/odoo#50502

X-original-commit: afa2153a24d495b863cd85febca3f96551d8cd56
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-30 16:03:54 +00:00
jvm-odoo 0e3b5c265b [FIX] mass_mailing: fix content not saved
Issue

	- Install Email Marketing
	- Create/Edit one of them
	- Save

	Changes not saved

	- Click edit & save

	Changes saved

Cause

	Before 30db768, the order of execution was:

	1. field_html > commitChanges (value = <p><br></p>)
	2. mass_mailing_widget > commitChanges (value = "test")

	After 30db768:

	1. mass_mailing_widget > commitChanges (value = "test")
	2. field_html > commitChanges (value = <p><br></p>)

Solution

	Use this.saveCroppedImages in mass_mailing widget to
	add the delay there too

OPW-2207107
OPW-2207817

closes odoo/odoo#47018

X-original-commit: 31e36fdc9b63fade99cef0c9ac4ed093b3936707
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-05 16:05:56 +00:00
Jérémy Hennecart fc8e4465e1 [IMP] mass_mailing: improve ui backend
- Replace the fa-clock icon on the kanban view for
the fa-calendar-check-o icon to be consistent with
others modules.
- When you wanted to create/edit a mail template using
the web_editor, when it was open in a modal, a part of
the body was behind the editor panel. Now the body is
correctly display when opened in a modal.

task-2198656
2020-02-27 09:59:23 +00:00
Nicolas Lempereur 661e190a3f [FIX] mass_mailing, web_editor: edit font awesome icon with zoom
In case of font-awesome icon when the browser is being zoomed, we can
get a decimal font-size.

There is a system that transform font-awesome in image links so they are
readable in any email client (supporting image) but it did not take into
account decimal font-size.

With this changeset, we only send a integer font size: we do not try to
get the original value because styling is relative on elements, a 90%
zoom ratio could lead to a 98% font-awesome icon ratio.

Also improve edition of font-awesome icon edition after first save by
reverting the transformation to image on edit. Thanks to that, the
original size will also be reinstated and will not depend on zoom on
previous save.

opw-2156069
closes #43949

closes odoo/odoo#44033

X-original-commit: fe72bf01b67ea20ddb74a5b05464c63cc77090ef
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-01-27 16:03:38 +00:00
Kishan Gajjar c0a1ff9bc1 [FIX] mass_mailing: restore background color option for mailing snippets
Changing the background color was not working
because 'o_mail_snippet_general' having a background color white.
while bg-* colors are applied on a parent of 'o_mail_snippet_general'

closes odoo/odoo#42513

X-original-commit: 751dd4c16f8e6c9e373bd9be3a783cde2833947d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-30 16:46:56 +00:00
Jason Van Malder 222fe36405 [FIX] mass_mailing: fix unsaved changes in source mode editor
Issue

    - Install Email Marketing
    - Create/Edit a template
    - Switch into source mode
    - Add things
    - Save

    Things not saved.

Cause

    The widget override his parent `commitChanges` and don't take
    source mode into account.

Solution

    Take source mode into account like:
    https://github.com/odoo/odoo/commit/e29c08969f6e7ad981e9b7b79027d84dc89fbca2#diff-59db103a74684967379b66a89695cfdeR102-R105

OPW-2151675

closes odoo/odoo#42193

X-original-commit: 14f55b8d95bbcaf2409342140ccad55a1cd1c2d7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-12-19 15:26:16 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
ryv-odooandStéphane Debauche a7489feed0 [FIX] mass_mailing: mail template become invisible after saving
Bug
===
In the mailing mailing form view, after saving the email and creating it, the body is invisible and one needs to edit and save again to see the content
The view has two fields with the same name

Fix
===
At the end, we have only one field and some condition on the attributes (class, widget)

TASK_ID : 2078918

Co-authored-by: Stéphane Debauche <std@odoo.com>
2019-10-01 11:04:10 +00:00
Juhil Somaiya ececa1f7bf [FIX] *: hide technical field widgets in non-debug mode (Studio)
*:
- account
- barcodes
- calenndar
- hr_timesheet
- mail
- mass_mailing
- partner_autocomplete
- web
- website_slides

This commit removes description of fields that should not be shown in
non-debug mode Studio. Only field widgets whose own description is
set are displayed in non-debug mode Studio in "Widget" of sidebar.
In other words, even if any ancestor has a description but not the
current widget, it won't be displayed in the sidebar in non-debug
mode.

Task-Id 2056992

closes odoo/odoo#35902

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-23 15:00:44 +00:00
Vincent Schippefilt 029dd1a214 [IMP] web: edit translations in new dialog
Before this commit, translations were edited in a list view with a filter
on the field that needed to be translated.

After this commit, the translations for each fields are translated in a
dedicated dialog. The changes done to the current language are taken
into account immediately, both ways, from the dialog to the form and
from the form to the dialog.

Translating terms is also available in create mode, the user will be
prompted to save before editing a translation

Task ID: 2028152

closes odoo/odoo#36185

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-09 13:09:53 +00:00
qsm-odoo 4f27e52cab [IMP] web_editor, *: introduce and restore new web_editor UI
* mass_mailing, note, website, website_blog, website_form,
website_mass_mailing, website_sale

This commit, unfortunately, mixes three things:

- Restoring as much as possible the scss organisation to allow styling
the web_editor UI properly.

- Fixing some bugs like a border around the page once the editor is
loaded, no ability to scroll the snippets, etc

- Introducing a whole new UI for snippet options: a left panel instead
of the old dropdown & button overlay.

Note: this commit also do some linting and ES6 convertion even though
some of it has been done in the parent commit.

Note 2: some elements that were removed are still styled in the POS apps
but this is because part of a feature was removed while leaving dead
code behind, this is handled in another PR which is to be merged
(https://github.com/odoo/odoo/pull/36136).

Part of https://github.com/odoo/odoo/pull/36068
task-1942370

closes odoo/odoo#36068

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-28 09:04:55 +00:00
56d0c1ed97 [REF] web_editor, mass_mailing: new iframe mechanism
Since we reverted the saas-12.2 editor in favor of the 12.0 one,
we faced a dilemna regarding how the editor iframe is handled in
mass_mailing.

The 12.0 version was using a special controller to get the website
assets required for mass_mailing while the saas-12.2 version used
a completely different mechanism that was, obviously, not handled
by the 12.0 version.

We did not want to reintroduce the old controllers who were
considered to be a hack to load the assets in the mass_mailing
iframe. However, we were very cautious about changing the editor
itself to avoid introducing new bugs in the editor core of 13.0.

The approach we chose at the end, is to use the loadAsset mechanism
introduced in saas-12.2 to load the necessary assets and inject them
in the mass_mailing iframe. This did not reintroduce the controllers
nor did it require to change the code of the editor itself. However,
it required moderate changes to the wysiwyg interface.

Part of PR 35677.

Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2019-08-22 06:41:05 +00:00
1eb1c2b029 [REF] web_editor: adapt wysiwyg tests to older summernote version
These modifications crystalize the behavior of the old editor, even
if it makes less sense than the behavior of the saas-12.2 one.

In some cases, the only reasonable adaptation we could do for 13.0
was to delete the tests, as these tests relied on mechanisms of
the newer version of summernote introduced in saas-12.2 which
cannot be easily replicated in the older version from 12.0 that
we are reintroducing in this PR.

It is sad to see these tests go, but we knew this was going to be
something we would lose in reverting back to the older editor.

That being said, since these tests were not present back in 12.0,
we are simply back to the 12.0 state of things, not worse. Don't
weep for them though, they will be back in Odoo 14.

Part of PR 35677.

Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: Antoine Guenet <age@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
2019-08-21 19:11:31 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Christophe Simonis b792ba7d9a [MERGE] forward port branch saas-12.3 up to 752b2553c6 2019-08-08 11:52:13 +02:00
Christophe Simonis 7d04dc1c7c [MERGE] forward port branch saas-12.2 up to 9e74730a26 2019-08-06 18:48:24 +02:00
Christophe Simonis 0fadd586fa [MERGE] forward port branch 12.0 up to ff9ddfdacc 2019-08-06 15:57:57 +02:00
qsm-odoo 3aa7e59bab [FIX] mass_mailing: adapt themes custom bg colors to BS4
Mass mailing themes are redefining some bg-* classes their own way...
unfortunately that way was not working anymore with BS3. This commit
adapts the CSS code to solve the problem but ideally, themes should be
refactored to be more BS4 compliant.

opw-2032131

closes odoo/odoo#35333

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-31 12:44:09 +00:00