To reproduce the issue:
-Drag and drop the rating snippet.
-Change the score from options.
-Notice that spaces between icons disappear.
In the release notes[1] of jQuery 3.5.0, it's stated that security
fixes related to the HTML parser were implemented. Consequently,
self-closing e.g. `<i/>` tags inside function arguments were replaced
with e.g. `<i></i>`. As a result, trailing spaces lost significance,
causing icons to stick together.
Before the commit:
Prior to Odoo 16.2, jQuery 3.3.1 was utilized, which allowed the use
of self-closing tags in the append function. This behavior was as
expected.However, starting from Odoo 16.2, jQuery version 3.6.3 was
adopted.
After the commit:
Instead of using self-closing `<i/>` tags, `<i></i> ` with a trailing
space was used. This trailing space gained significance due to the
prefilter no longer ignoring it. Consequently, icons no longer stick
together after changing the score.
task-3576760
[1] https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/closesodoo/odoo#161076
X-original-commit: b897e836697a288bbd58a8efc340d9f7b2e76e30
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit introduces an update to the Font Awesome library,
specifically replacing the X/Twitter icon with its new design. It also
involves adjustments to a few images and SVG files to incorporate the
updated X/Twitter logo.
Technical note: It updates an existing file, originally modified for the
addition of the TikTok icon, which was not available in Font Awesome 4.
task-3463530
closesodoo/odoo#158586
X-original-commit: 34cba04a452f2da21f3418d6fc48a484da8ecd27
Related: odoo/enterprise#59147
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Current behaviour:
When trying to preview a mailing template
with the debug mode enabled, there is an error:
Invalid props for component
Steps to reproduce:
1. Enable debug mode with assets
2. Go to Email Marketing
3. Create a new Mailing
4. Select a template
5. In the Editor, click on the mobile icon
6. ... 'preview' is not a function
Cause of the issue:
Caused by https://github.com/odoo/odoo/commit/13b3f8af4b55d32912b698ae1672be9e144cb775
opw-3702901
closesodoo/odoo#153176
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
Before this commit:
When we apply a text color and change its font size, the text color defaults to
black. This occurs because the default black color is applied to a span within
`o_basic_theme.o_layout`.
After this commit:
Now, when applying text color and adjusting its font size, the color of the text
remains unchanged.
task-3770351
closesodoo/odoo#156602
X-original-commit: 6c305ee13ad56ce99e3146a162d28094554b92d7
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps:
- Create a draft mailing based on a theme that has the snippets menu
(the "Event Promo" theme, for instance).
- Create another draft mailing, this time based on the basic theme
("Plain Text").
- Switch from the former to the latter using the form view pager.
The editor for the basic theme record is not supposed to have a sidebar
(snippets menu), as it uses the floating toolbar instead. But when
switching between records like described above, the basic theme gets
replaced by the theme of the preceding record, and the snippets menu is
added to the UI.
This happens because [1] patched the `setValue` function to handle the
case where the element for dropping snippets (.o_mail_wrapper_td) is
missing, in particular if it gets removed via the codeview. Such fix
most likely had in mind the scenario where the codeview is toggled on
and off, but not the call to `setValue` that also happens when switching
between records via the form view pager. As a result, the html content
of a record based on the basic theme, in which such "dropzone" is
absent, is added as a child of the previous record's .o_mail_wrapper_td
element. This is certainly not the desired behavior, as it ends up
overwriting the basic theme by the one from the previous record (the
theme is defined by a class in the .o_layout div, which is a parent of
the .o_mail_wrapper_td element).
This commit, besides fixing the described issue, takes the opportunity
to add a comment with the presumed reasoning behind commit [1] and
extends the test tour in order to prevent regressions.
[1]: https://github.com/odoo/odoo/commit/9be2cb538f937645be4650af1031c8a1445bb48b
task-3573951
closesodoo/odoo#151065
X-original-commit: ed4727d922107745482dbbeb068d4bd6eba788dd
Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Issue:
======
Adding a new block in mailing in email marketing raises an error.
Steps to reproduce the issue:
=============================
- Go to email marketing
- Create a new mailing
- Create one from scratch
- Drop any block
- `TypeError : Cannor read properties of null (reading 'parentElement')`
Origin of the issue:
====================
When we drop the block in the iframe's document we trigger the `click`
event but we don't have any selection yet in the document so
`anchorNode`will be `null` thus the error.
task-3724551
closesodoo/odoo#152814
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
The 'saveModifiedImages' function is already called by the parent class'
(HtmlField) 'commitChanges', in which the replacement of the images' src
attribute and the removal of the 'o_modified_image_to_save' class are
done with the editor's observer deactivated.
Before this commit, calling this function before the call to
super.commitChanges resulted in converting the images within a history
step that was later reverted by the 'historyRevertCurrentStep()' call at
the end of the '_pendingCommitChanges' function.
Morover, the '$content' property is undefined.
closesodoo/odoo#152065
X-original-commit: 622ca94b958444ae2279f13871c6a05942fdaf0e
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Signed-off-by: Rodolpho Cammarosano de Lima (rcdl) <rcdl@odoo.com>
Before this commit:
When we have some text in selection and we move away from the selection the
the toolbar disappear.
After this commit:
The toolbar is still visible when we move far from the selected text.
task-3054229
closesodoo/odoo#151354
X-original-commit: cbcad3b85f78dd42f7e059471498009be27a9045
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Current behavior before PR:
- HTML tags are displayed in the onboarding tour.
Desired behavior after PR is merged:
- Display the HTML tag effects instead of showing it in the onboarding tour.
After the https://github.com/odoo/odoo/pull/107618 web_tour was converted into
Owl, 'markup' was required to show the html tag effect instead of htm tags.
Related Enterprise PR-https://github.com/odoo/enterprise/pull/53893
Task-3457112
closesodoo/odoo#149957
X-original-commit: c26ba2943317e82388bc05adfd64fa729923a86b
Related: odoo/enterprise#54622
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to Reproduce :
1. Open Email Marketing
2. Type a long text in the subject line
3. You will notice that the content gets overlapped over the emoji icon
Observed behavior:
content getting overlap over emoji icon
Expected behavior:
the content should be hidden by the emoji icon
Task-3628324
closesodoo/odoo#149918
X-original-commit: 80c96838a4d16a821aaf11e04ca2776f6a884507
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Sanket Brahmbhatt (sabr) <sabr@odoo.com>
*: analytic, mass_mailing
This commit fixes the supportedOptions object in some fields. Instead of using
a 'supportedTypes' key when descbribing the type of fields that an option must use,
the 'availableTypes' key must be used. This was simply misspelled.
A help has also been added for the fold_field option, following the fix for task-3474817
closesodoo/odoo#143127
Related: odoo/enterprise#51241
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
How to reproduce:
- Create an SMS and send it
- go to the sent option and select a contact
- Click on add to list
- Select a mailing list
- then click on add and sent mailing (you will be redirected to email marketing)
- Select a template and send it
- The recipient will not be able to see the template (The email is blank)
Issue:
Template value is not stored in the body_html field
Technical reason:
When the record is saved the changes in `body_html` are discarded from _getchanges() https://github.com/odoo/odoo/blob/c2b160fe50c24e9f01d0d5b350f2422cfdbc72d4/addons/web/static/src/model/relational_model/record.js#L574-L581
because, field is set to readonly = 'true' after this commit https://github.com/odoo/odoo/pull/132247
After this commit:
The recipient will be able to see the template
Task-3556020
closesodoo/odoo#143293
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, multiple toolbar instances would be created when
switching between records via the form view pager.
This commit fixes the issue by using and properly setting up the
existing Toolbar child component, without the need to instantiate a new
one. It also removes this module's dependency on the legacy
ComponentWrapper.
task-3495685
closesodoo/odoo#144802
Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
With the mailing filter widget, a traceback was raised when unfocussing
the domain editor. We now check if the format is correct and return
early without raising a traceback. It is also now no longer possible
to try to save the unsupported domain in the favorite.
task-3569969
closesodoo/odoo#141490
X-original-commit: f2f3b185e9f2d069e3fb3975b20ba2a1002e20ca
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
This commit introduces some adjustments to the dark mode color scheme
and the use of bootstrap classes in Community.
- Mini calendar contrast -
The colors were not using variables, making them non dynamic
and breaking the contrast in dark mode.
- Avoid !important rules spreadsheet -
Prior to this commit, spreadsheet top bar was using a `bg-white` class,
making it pure black in dark mode.
Since spreadsheet is designed with light colors and we don't provide a
dark mode for it, we remove that class and set a `background-color`
property using CSS in Enterprise.
- Input color -
This commit fixes the focus behavior on the searchbar in the control
panel, the `command_palette_search`, and the `start a conversation` in
discuss.
- Copy clipboard field border color -
Make use of the `text-primary` color for the copy to clipboard field
We use the o-theme-color function to avoid an undefined since primary
doesn't exist in the o-theme-text-color map in white mode.
- Web_editor toolbar variables -
The toolbar was using the `o-brand-primary` variable
which was set to a darker shade. This caused issue when activating an
option due to how vibrant the color is.
- Improve the controls on border-color -
Introducing a custom property on the border-color to allow
further control on individual components (such as the popover).
- Improve setting tabs colors use -
Prior to this commit, the colors of the settings tabs menu were kinda
inverted. The menu was light in dark mode and dark in light mode.
We fix this by changing the values associated to the CSS variables in
use.
- Make model field selector dark mode proof -
Fixing the design of the model field selector popover in both
light and dark mode. Since the popover was using custom style with
arbitrary values, it was not designed for the dark mode and had a lack
of consistency.
To improve the design, we use variables rather than custom style, and
make sure the desired render is as close as before.
- Sign colors use -
This commit aims to improve the sign module in both light and dark mode.
There were some readability issue with some `btn-light` having poor
contrasts in both light and dark mode, and the use of some classes was a
bit unexpected (e.g `card-header` to set a grey background with some
padding).
- Improve buttons design inside listview -
Prior to this commit, this button was using custom CSS to make it look
like a primary button, while it was using classes related to secondary
buttons.
We remove the custom CSS used to style it correctly and keep our button
design consistent.
- Messaging menu layout in mail -
This commit aims to improve the design of the notifications displayed
in the messaging menu. Prior to this commit, the notifications dropdown
was using custom CSS variables overriding the regular behavior
of our dropdowns.
In fact, the layout was generating some friction:
1) Marking a notification as read would turn its background into a
darker color
2) Effects like `:hover` were all based on the custom CSS variables
resulting in an inconsistent layout.
- Multi company selector adaptations -
In darkmode the multi company selection was using the btn-light which
creates a weird effect and overrides the dropdown default hover behavior
This commit uses the btn-link to display an hover effect on the
company switch and on the checkbox while blending with the background
and the default dropdown hover effect.
- Adapts default badge design -
Improve the design of the default badges in dark mode.
If you open the light mode, these badges are dark grey with a white
text. If you switch to dark mode, they are dark grey but with a dark
text, which makes them look either muted or off.
We make use of SCSS variables to handle the color of the component,
providing a good styling in both modes.
- Fix kanban cards borders inside dropdown -
Fixes the issue with the divider inside the kanban dropdown menu not
showing in dark mode.
To ensure it is visible, we assign it the `$dropdown-divider-bg`, which
is the color it should use, as the horizontal divider above uses.
- Fix tour pointer design for dark mode -
This commit aims to insert the tour pointer and its content inside the
styling we applied to our tooltip.
To do so, we make sure it uses CSS variables, allowing more control and
consistency, plus we replicate the overall look of our tooltips.
- Fix `text-primary` on action background contrast -
This commit improves the readability of our `text-primary` classes when
it's used on a `$o-component-active-bg` background.
Prior to this commit, the `text-primary` was not meeting the contrast
standard, mainly when you were using the `CMD+K` shortcut on the
app switcher.
To prevent that, we changed the background to a `$o-component-active-bg`
background with an opacity ensuring our text provides a good contrast.
- Fix input states -
Prior to this commit, the `--o-input-border-color` CSS variable was
using the `$o-form-lightsecondary` variable to define the standard color
of the `border-bottom` property of our inputs.
This was conflicting since `$o-form-light-secondary` is also used to
define the `background-color` of our table on focus.
With this commit, we separate these two element with different variables
to make sure they don't affect each others.
- Fix kanban ghost background -
Before this commit, if you created a project without any stage or element
in it, the ghost cards that act like placeholders would be pure `#000` in
dark mode, due to the `bg-white` class.
This commit replaces that class with a `bg-light`, providing a better
visual result in both light and dark mode.
- Fix new message design -
Improve the design of the new message element while
inside Discuss, using our danger color, ensuring a good visual result in
both modes.
task-3201038
closesodoo/odoo#139966
Related: odoo/enterprise#49666
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Co-authored-by: chgo-odoo <chgo@odoo.com>
Co-authored-by: stefanorigano <sri@odoo.com>
Before this commit:
When we paste html using selectAll and we click code view button then the newly
added template will be visible and immediately got removed by old template. This
problem is because of pasted html is not sanitized.
After this commit:
Now when we paste html using selectAll then we actually see new html template in
result.
task-3473633
closesodoo/odoo#139384
X-original-commit: 6d6e1527ccdf5e616330905bc4b7e4fdd80c6192
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit:
When you try to copy paste html in code view of email marketing then in preview
it will show the code instead of template.
After this commit:
Now when you try to paste html in code view of email marketing then it will show
template preview as a result.
task-3473633
X-original-commit: 5cd1a900d89c34877be2c1036ad52d8b4a70c849
Part-of: odoo/odoo#139384
The PR https://github.com/odoo/odoo/pull/104741 have recently modify how the modifiers required, readonly,
invisible, and column_invisible are defined. They are now given by Python
expressions instead of domains. In this PR we introduce two main new
components ExpressionEditor and ExpressionEditorDialog that allow to
edit/view a Python expression in a way similar to what is done in the
DomainSelector/DomainSelectorDialog. For this we have extracted the main
logic found in DomainSelector and moved it to a new component TreeEditor
that is used by both ExpressionEditor and DomainSelector. For this we had
to add a new type of leaf we call "complex condition" that allows us to
represent indecomposable (sub)expressions, i.e. expressions we cannot
(or don't want) to express as conditions of the form (path, operator, value).
The main mappings allowing to transform trees, domains, expressions into
one another (when possible) are to be found in
@web/core/tree_editor/condition_tree.js.
closesodoo/odoo#136258
Related: odoo/enterprise#48512
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Carion <juca@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Pierre Pulinckx <pipu@odoo.com>
*: mass_mailing, test_website, web, web_editor, website, website_event,
website_sale
This commit removes jQueryUI draggable and droppable component to
instead use our own implementation of the feature. This replaces the
last use of the lib: the web_editor drag and drop. This takes advantage
of the code that was already written for other features of the backend.
task-3079246
closesodoo/odoo#136793
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: web_editor, mass_mailing
This commit changes the way the font size selector works. Before this
commit, the font size selector applied a hardcoded font size using the
style attribute of the selected element. The purpose of this commit is
to change this to apply a class on the selected element, making it
responsive and customizable.
In all Odoo applications, the font size selector will now apply a class
on the current selection. An exception is made for mass mailing where
the class would not make much sense as not related to the custom heading
sizes (probably needs to be refactored in the future to use the standard
font-size classes) and fonts cannot be responsive in mails anyway (so
there would be a difference between preview and sent mail).
Those classes are:
- `display-N-fs` with N in [1 => 4]. The sizes are stored in the
`$display-font-sizes` map.
- `hN-fs` with N in [1 => 6]. The sizes are stored in the
`$hN-font-size` variables.
- `small` for the small font size. The size is stored in the
`$small-font-size` variable.
The font size selector shows the value of the class (which is dynamic)
that will be applied.
In the website application, the value of each class is configurable
thanks to a previous commit. The user can choose the size of each font
size class in the website settings.
Note that many alternatives were considered for this feature, this is
the chosen compromise. For the record, here is a very short summary of
the alternatives:
- Doing nothing: voted as the worse idea. Users see a font-size selector
they will use it one way or another. The font-size won't be
responsive, breaking their mobile website. And there are real use
cases you could not do: a big "promotion" paragraph on your product
page? Not possible: you either break your mobile page (using the font
size option) or possibly hurt your SEO (using the font-style option
and turning your paragraph into an h1).
- Removing the font-size selector: we did not want the loss of the
feature as there are correct usecases to use it (as mentioned above).
- Using the Bootstrap hN and display-N classes instead of making new
ones. Closed to be the chosen idea but discarded because those classes
comes with colors (that the user can configure) and it would feel
weird to have the color change when changing the font-size. Also, in
the end, we also did not want the line-height, margins, etc of those
classes (only the font-size).
- Instead of X new classes, have only one: o-fs, which would be applied
alongside a bootstrap hN or display-N class, when chosen by the user,
to cancel the unwanted style of those. It works but it forces us to
always have an added `<span>` to apply the font-size, which we don't
want in the future (mainly because of display-N classes, see next
commit). It is actually very needed to be able to use proper
line-height when reducing the font.
- Using a combination of an inline `em` font-size + a class to clamp it
on mobile. Was probably the best next idea but rejected for several
reasons. The main one probably being the inconsistency when changing
the whole size of a title/paragraph (not part of it) and later
changing the related theme size later. E.g. have an `<h1>` followed by
a `<p>`. The h1 is 40px, the paragraph is 20px. Force the title to
20px, because you want it smaller, same size as the paragraph. Real
use case but also users could simply use the font-size controls by
mistake. We would thus apply 0.5em to do that. Later, change the theme
font-size of h1 to 36px (small change). The 0.5em one is now 18px,
smaller than the following paragraph. Preventing that would require
more checks which would "break" other things / possibilities.
- Probably others that were forgotten.
In the end, there was no good or bad answer. "Anything works", as long
as the feature "I want this text smaller/bigger" is there. The
surrounding features are always compromise (some users would expect some
behavior, some users would expect others). This commit focused on
solving the unresponsiveness of those custom font-sizes, which was a
problem for many users.
task-1958098
Part-of: odoo/odoo#129791
Co-authored-by: qsm-odoo <qsm@odoo.com>
The aim of this commit is to improve the impact and rendering of app
icons in bright and dark mode. It also reduces the size of svg files.
To achieve that, this commit updates the colors to flat colors. This
change will make the icons stand out and improve their readability.
task-3072562
X-original-commit: 667a19162b74fb6554a2389ba9c6e69de4ff5113
Part-of: odoo/odoo#138279
We improve various aspects of the domain selector:
- We make the domain selector be able to display all domains accepted by the class Domain (domain.js)
- We improve the edition/selection of values, e.g. for the operators in/not in
- We improve/simplify the style/dom
Task IDs: 3507123, 3508940
closesodoo/odoo#128680
Related: odoo/enterprise#48324
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Mathieu Notté <mano@odoo.com>
This fix is only a missing of the commit 7f5a0ccf9e5fdf3f7fece8a9.
As a reminder, in 7f5a0ccf9e5fdf3f7fece8a9, we check that the content of
the dialog is markuped. If not, we escape it.
So in this commit, we add the markup to the "props.preview".
closesodoo/odoo#138494
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
- Before this commit, it could happen sometime that the time for
which mailing was schedules has passed, but user was still
getting the same ribbon that mail was scheduled for a particular
time (which is a bit confusing). And also in the case of
schedule_type equals to now we are displaying the next_departure
datetime in ribbon.
This commit improves the behavior and in such cases, displays a new
ribbon message saying "This mailing will be sent as soon as possible."
and has as refresh button next to it, which reloads the page. Once
the mailing is sent, this ribbon will also be hidden.
For that, we introduce a new compute boolean `is_past_departure` which
will be true only if the scheduled time is in past and the mailing is
still in queue.
And for the case scedule_type equals to now we are displaying
a new message on ribbon with refresh button.
- Re-arranges the model container part of the form view of
a mailing in order to utilize the horizontal space.
It moves domain next to the model / filter related fields so that
everything is in a single row, and thus reducing vertical space.
TaskId-2702607
Part-of: odoo/odoo#82107
In this commit, we remove three usages of the getBundle function from
@web/core/assets.js. The final goal is to remove it totally to simplify
the understanding of assets's API. To replace the use of getBundle in
mobile preview dialog, an xml template has been created on the server
side and then called by http requests. During the request, we retrieve
the list of assets (server side getbundle) to inject these into
the xml template.
taskId : 3266441
closesodoo/odoo#138055
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
PURPOSE
Globally improve usability and features given by mailing portal about exclusion
list and opt-out management.
SPECIFICATIONS
Messages and notes are improved to have a better wording and links to contextual
records when possible (mailing, mailed records, contacts, ...).
Add opt out reasons when updating subscriptions or block list status. This
allows to better report on common causes.
For that purpose we introduce a new model allowing to store those reasons.
A boolean flag allow to trigger the usage of the feedback textarea in portal
page.
Task-2150462 (Mass Mailing: Improve subscription management)
Part-of: odoo/odoo#86084
PURPOSE
Globally improve usability and features given by mailing portal about exclusion
list and opt-out management.
SPECIFICATIONS
Currently mailing portal is usable only through dedicated links added in
mailings. Those use a hash token based on mailing, document_id (if mailing
ran on business documents) and email of the recipient. However this is not
convenient, especially for users that want to update their subscriptions
manually.
Purpose of this commit is to add a generic page in mass mailing allowing
to manage subscriptions to mailing lists as well as blocklist status directly
from portal. That way people don't need to come from a given email mailing
link.
A new page is added. It is located on ``mailing/my`` and has the same
capabilities as the unsubscribe pages, except it works outside of a given
mailing contact. Page (html, js) and behavior are shared among the various
use cases.
This page is available for logged user, both internal and share. Other people
should come through existing unsubscribe links using email, document id and
hash token.
Access control is updated so that it is now possible to use mailing routes
without requiring always email / document_id / hash_token. User can be used
instead.
A tour is added allowing to test this new feature.
Task-2150462 (Mass Mailing: Improve subscription management)
Part-of: odoo/odoo#86084
PURPOSE
Globally improve usability and features given by mailing portal about exclusion
list and opt-out management.
SPECIFICATIONS
Purpose of this commit is to cleanup and improve the portal subscription page
that allows to manage subscription to mailing lists and blacklist status.
Main features updated or added
* allow to give a feedback when unsubscribing from mailing not related to
mailing lists. It was previously limited to mailings done on mailing lists.
Now the feedback is allowed in all cases and posts it on the related
document;
* clean display of opt-in and opt-out lists;
* display all public lists, even if not already join. This allows to opt-in
to new lists, which was not possible before;
* switch on a neutral name for non public lists (as they may contain
marketing hints);
* give UI feedback to customer when using buttons: add confirmation of
block list addition / removal, of updated subscriptions, ...
* globally improve wording;
Unsubscribe from a document now uses the same layout as unsubscribe from
mailing lists. Indeed the first one blacklists the email while the second
one opt-outs from mailing lists. But overall form is the same and options
are also the same. After all previous cleaning we can now keep a single
page for everything.
Task-2150462 (Mass Mailing: Improve subscription management)
Part-of: odoo/odoo#86084
PURPOSE
Overall cleaning of subscription and exclusion management code from portal.
This code comes mainly from v12 and can now benefit from cleaning and update.
SPECIFICATIONS
Purpose of this commit is to cleanup code that manages chosen lists from
portal and updates opt-in and opt-out accordingly.
Code is now located on mailing list model. When opting-it, new subscriptions
have to be created for mailing lists so that email is part of the list. When
opting-out we just have to toggle the opt_out flag on subscription model.
Logged messages are also improved. We log on contact model the updated
mailing lists for opt-in or opt-out.
Task-2669037 (Mass Mailing: Refactor js/portal for subscription)
Part-of: odoo/odoo#86084
PURPOSE
Overall cleaning of subscription and exclusion management code from portal.
This code comes mainly from v12 and can now benefit from cleaning and update.
SPECIFICATIONS
Purpose of this commit is to get rid of old declarative javascript used in
mass mailing. It is still using old fashioned JS, not using widget or any
standard way of doing JS-based behavior in Odoo.
In this commit we introduce a main widget that manages the subscription page.
It has 3 sub widgets to manage parts of its features
* blocklist management: add or remove current email from exclusion list.
Adding an email in exclusion list is doable only if activated in settings;
* feedback: allow user to give their feedback. It currently logs on target
model, based on a hardcoded search on 'email_normalized' field. This is
strange as not all models have a normalized email field, but who am I
to judge anyway ?
* subscription management: allow to opt-in and opt-out from mailing lists;
This commit mainly keeps the current behavior, just rewrites the JS part.
Some further feature or UI update will move into sub-widgets in subsequent
commits.
Some Markup issues are also fixed in this commit, as code is already updated.
Task-2669037 (Mass Mailing: Refactor js/portal for subscription)
Part-of: odoo/odoo#86084
Purpose of this test is to add tours and tests about the portal in mass mailing
that allows to unsubscribe from mailing list and to use the exclusion list.
This is done using small tours called from unit tests. Two type of tours are
added. The first one targets mailing done on mailing lists. As it targets
contact model unsubscription click opts-out the contact from the mailing
list. The second one targets mailing done on other documents. When clicking
on unsubscription link the document's primary email is directly added into
the exclusion list.
Some other additional tests are added to cover various use cases and features
of mailing controllers.
Task-2150462 (Mass Mailing: Improve subscription management)
Part-of: odoo/odoo#86084
Before this commit, owl was in the linter's accepted global variables.
This allowed direct access to owl global object.
For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`
Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:
`import { xml } from "@odoo/owl";`
task-id 3498859
closesodoo/odoo#137517
Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Before this commit, in a Email Marketing form sheet, there was a
margin-left spacing on alerts and unnecessary old CSS rules.
This commit addresses and corrects that spacing issue.
task-3488229
closesodoo/odoo#137469
X-original-commit: 390fbed6b4c978de076887f755427d0f7c538c64
Signed-off-by: Xavier Luyckx (xlu) <xlu@odoo.com>
Prior to this commit, the first drop zone at the top and the last one at
the bottom were half hidden.
This commit adapts their position in order to be fully visible.
task-3368793
Part-of: odoo/odoo#132653
*: analytic, base_automation, loyalty, mass_mailing, project, web, web_editor, website
This commit adds many new documentation of options and their usage for
fields. This makes them more usable and customizable in Studio, and adds
documentation for developers to know the type of expected option.
Some options that might lead to issues or that are too technical have
been removed, as they are not relevant and not required in most use cases.
task-3469741
closesodoo/odoo#134858
Related: odoo/enterprise#47148
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This commit removes the files ajax.js and rpc.js then adapts all the
places where their exports were used. For most of the changes, it's a
replace of `this._rpc({...})` by a new `useService("rpc|orm")` like
pattern in the widgets.
closesodoo/odoo#136271
Task: 3439226
Related: odoo/enterprise#47775
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Since the new model (PR: odoo/odoo#114024), updating a record no longer
triggers a deep render and therefore no longer triggers the onWillUpdateProps
for Field components.
The goal of this commit is to adapt the usage of onWillUpdateProps
in Field composents in order to fix the bugs introduced by the RelationalModel
closesodoo/odoo#135842
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit:
The `mailing_filter` widget used to take the 2nd occurrence of a
many2one(selection) field and hide it in certain conditions, as it was assumed
that it is the field having the widget. Thus when there is more than 1
occurrence of a many2one field in the form view (before the field with the
widget), it used to hide random fields instead of targeted field.
After this commit:
The `mailing_filter` widget will only target the field with the widget, hence
solving the issue at hand.
Task-3430510
closesodoo/odoo#136094
X-original-commit: 4f5b8c47be4077cdaf7837062f518b7aef529d71
Related: odoo/enterprise#47678
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit tried to remove owl_compatibility completely but its last
uses are either in refactoring or a bit complex to migrate. Instead of
removing the helpers completely, this commit simplifies them a lot and
makes them more readable and safe.
closesodoo/odoo#134295
Task: 3439226
Related: odoo/enterprise#46899
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: mass_mailing,website,website_sale
Before this commit, the ComponentWrapper was used to mount some
components which then render a dialog. This commit replaces these cases
by using the dialog service.
Task: 3439226
Part-of: odoo/odoo#134295
In this commit, the loadXML function has been removed. We use registry with
xml_templates to load XML templates for OWL Apps.
The goal of task is to remove loadXML and getBundle from assets to simplify
the understanding of assets api.
task-3266441
closesodoo/odoo#134520
Related: odoo/enterprise#47001
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
This partially reverts commit da50ce31ae825ef9f4b527553a2e2caec970d290.
Whilst the behavioral changes done in the task are correct, the wording
is not optimal and was better understood by users before this change.
Task-3483936
closesodoo/odoo#133511
Related: odoo/enterprise#46503
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
This commit, adds a new python method (`web_save`) to save a record, and
optionally read-it again in one rpc call. This optimizes the current
behavior that is to save a record in one rpc, and read-it in a second
rpc.
web_save, will receive the list of IDs of the records to save (if this
list is empty it will create the records, if not, it will write on the
existing records), the list of changed fields, and the unity
specification as optional argument to read the created/modified records
(if the specification is not set, the function will return a list of IDs
of the created/modified records).
closesodoo/odoo#133021
Task-id: 3453184
Related: odoo/enterprise#46559
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit removes the legacy session and adapts the modules where it
was used.
task 3439226
closesodoo/odoo#133153
Related: odoo/enterprise#46290
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit fixes an issue introduced in #118966. For the mobile preview
feature of email marketing, styles used to be loaded by rendering an "empty"
template with the necessary styles. These styles, however, are no longer
imported in a template, but instead in mass_mailing's manifest.
The fix is to manually load the bundle and create the link tags to add the style
to the mobile phone preview.
Task-3465776
closesodoo/odoo#133400
X-original-commit: b2796d8016be83a1d08f28ef48e98db90c07da69
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The Mail Debug tab is confusing for users and should only be used by
people who know what can or cannot be expected from it. It is not
providing a good preview of the e-mail's rendering since the HTML it
displays is not meant to be rendered by a browser but by all sorts of
e-mail clients. This means that some things that render properly in it
won't necessarily render properly in some e-mail clients, but also
likewise that some things that don't render properly in it will in fact
render as expected in e-mail clients. This is why it's only available in
debug mode but since many users routinely enable debug mode to get
access to hidden features, this is not enough to prevent them from
reporting issues that are not issues.
closesodoo/odoo#133208
X-original-commit: 240ee9deb898f4346a9bc66548c881fc69e8b117
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The tour `mass_mailing_code_view_tour` indeterministically fails:
When clicking on save in the mass_mailing form, it trigger multiple
call to `MassMailingHtmlField.commitChange`. The expression
`await this.props.record.update({[fieldName]: inlineHtml});` will
subsequently temporarily add the class `o_form_dirty`, after the steps
of `stepUtils.saveForm` have been consumed by the tour.
When a tour finishes, some python code (see
`ChromeBrowser._handle_console`) check that there is no
`.o_form_dirty` element in the DOM. As the class `o_form_dirty` will
temporarily be in the DOM:
- if the check happen before the class is added or after it is
removed, the test will succeed
- if the check happens right before the class is removed, the test
will fail
As the timing is indeterministic, the test is indeterministic.
This commit uses `discardForm` rather than `saveForm` (to avoid having
`.o_form_dirty` from being temporarily added upon save)
Using `discardForm` can make a traceback occurs because a `setTimeout`
callback is called trying to use a selection that is undefined because
the document has been removed at the time of the call.
For this reason, this commit also check that the existence of the
selection.
runbot-23605
closesodoo/odoo#132983
X-original-commit: f34d87ecb7772417f1dd8f3d8836c89ddb903de8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>