Steps to reproduce:
- Install Inventory
- Open any product
- Switch to RTL language
- Edit the product
- Try to translate field "Internal Note"
Issue:
Button is not displayed correctly (nearly hidden).
Issue also present with wysiwyg or codeview editors.
Cause:
Applying style `right: 5px` to the button without taking into account
if layout direction.
Solution:
On translate button:
- Apply direction left for side-space if RTL, else right.
- If wysiwyg is enabled, add it after the buttons in the sidebar.
opw-2962790
closesodoo/odoo#99567
X-original-commit: 56f620ff65ca9c1e5d9a64f5280ea16fd469c87d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Introduce a new Dynamic Placeholder Generator
in mass mailing and SMS creation.
Using a specific character (#) in subject or via the PowerBox in body
we open a field selector popup, which can be use to select
the wanted field and enter a default value. on validation, the dynamic
placeholder will be inserted in the corresponding input/editable.
task-2154624
closesodoo/odoo#71878
Related: odoo/enterprise#30333
Related: odoo/upgrade#3766
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The fix that removed the loading attribute of images was targeting
the wrong method `_createWysiwygInstance`.
In 15.0, the method does have a typo (`_createWysiwygIntance`).
closesodoo/odoo#98363
X-original-commit: 7a352330094ee2e267f29d9f479b4e31e90dbec6
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
If images are lazy loaded in mass_mailing they risk not being converted
properly. This removes the loading attribute from all previously added
images when the editor loads.
opw-2850967
closesodoo/odoo#98107
X-original-commit: 3cb0f466cfa982aeb802e08ded8bdbf7b8f01220
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
This commit improves the embedded tree view of mailings, sms within
a campaign, and makes it uniform with the original tree views.
However, due to lack of space, we display the stats simply in
numeric format instead using progressbar widget.
Also, to save a bit space, if no mailing, sms has A/B testing
enabled, we hide that column.
Apart from that we have added sum for the field `sent` and average
for these fields,
- recieved_ratio
- opened_ratio
- clicks_ratio
- replied_ratio
- clicked
- bounced
TaskID-2653806
Part-of: odoo/odoo#77768
This is an addition to commit 098202ba584ca6ba3544ccd00397578f5deb12ad
The design tab allows the customization of the separators' border-style
and width as well as color, but this is currently broken because it gets
overridden by the default styles of the snippet, which has higher
specificity.
Part-of: odoo/odoo#95940
Old thumbnails for deprecated snippets have been removed. The
other snippet thumbnails have been grouped together in same folder.
Some images are unnecessary since the new mail builder, some are simply
not used anywhere.
The references snippet is limited to four images, adding more columns
will copy the last column's image, so no need for images 5 and 6.
The basic template doesn't allow snippets - the editor doesn't even
appear - since no snippets can be added, their images are unnecessary in
the templates image folder.
In all cases, the drag&dropped snippets, even from other templates,
use the theme_default images and not the templates' images.
Move all images in snippets_demo folder to theme_default folder
For more consistency, default images have been renamed according to
their snippet names
Part-of: odoo/odoo#95940
This snippet is now similar to the one being used in the web editor.
What was once a single event on three columns is now two events on
two columns.
The snippet's thumbnail has been redesigned to correspond to the
snippet's new design.
Part-of: odoo/odoo#95940
This snippet is already no longer in use.
The snippet is very similar to the call_to_action snippet
[REM] mass_mailing: title_text snippet removed
This snippet is already no longer in use.
In order to get the same result, we can use a combination of the title
and the text snippets.
Part-of: odoo/odoo#95940
Removed unnecessary classes and placed necessary styles as inline styles
for better support by the builder.
Removed options.js which allows to change the blockquote's style as in
the web editor, but none of the other options is well supported in
emails. Due to this change, the blockquote's cover image is removed.
Changes to text done via the Design tab in the builder weren't being
applied to text inside `<span>`, so this has been changed to a `<p>`
element in order for the changes to be applied.
Part-of: odoo/odoo#95940
Structure and styling changed to allow padding X when this snippet is
not inside another snippet. Otherwise the alert block, in w-100, didn't
have any space between the edge of the email template and the block.
The "Type" option wasn't working: as all the elements can be changed
with other options anyway, the code for this one has been removed
instead of trying to fix it.
Part-of: odoo/odoo#95940
In previous versions of templates, all the styles were needed in every
template in `<styles id="design-element">`. This is no longer the
case and it has been cleaned up to only use the styles that differ from
the "default" ones found in the `mass_mailing_design_constants.js` file.
There was a priority problem (ex: `a.btn` inside `p` takes
`p`'s text color instead of `.btn`), this is resolved by placing the
default styling in `theme_default.css`
`theme_default.scss` contained classes that were no longer necessary or
would override styles from the builder. These have been removed from the
SCSS file and from snippets and templates where these were applied.
If the styles are needed, they should be added as inline styles.
The theme_default template was calling snippets with `t-call`
which prevented customization of the theme.
Snippets have been added in full with further customization.
task-2835454
Part-of: odoo/odoo#95940
As mentioned in the previous commit, the circle in the `Styles` option
has been replaced by a shape.
Previously we used `.rounded-circle` on images to make them round,
now we use the new circle shape from the `Shapes` option to achieve
the same effect.
This change has been applied on the snippets' images.
Snippets containing icons with these options have also been modified.
In the builder, the `Shapes` option generates a second image (circle)
from an original source (square image) and applies various
data-attributes.
In order for the option to function correctly on snippets,
the different data-attributes such as `data-original-src` and
`data-shape` have been added manually to the snippet's images.
This creates a need for an original image and a shaped version of the
image in the repo.
task-2836942
Part-of: odoo/odoo#95974
The `Styles` option contains styles which are unsupported in
emails. The few that are supported can be replaced by other options.
- Shadows: unsupported;
- Rounded rectangle: (unsupported in Outlook)
is replaced by the `Border` options which allows to customize the
border's radius more than the current option.
- Thumbnail: can be done with a combination of `Border` and `Padding`
- Circle: can be done with a shape
(which has been added along with other new shapes)
This option could be found on images and icons and has now been removed.
CSS styles in the `theme_default` file have also been removed since
they are no longer needed.
Three basic shapes (circle, triangle, "slanted" rectangle) have been
added to the `web_editor`'s `Basics` shapes page.
A condition was previously set on the page to avoid showing an empty
page. The condition is moved to each of its buttons instead, so that
new shapes added via xpath from `mass_mailing` to this page are now
visible.
task-2836942
Part-of: odoo/odoo#95974
When starting the import contact wizard from an active mailing list, the
mailing list to which the contact will be imported was not set. This solves the
problem.
Task-2924241
closesodoo/odoo#97560
X-original-commit: cdd102f30d2092fa31911ab2f00e90fec846165b
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Since the merge of the new form view, the styles of the
form view in mass_mailing was completely messed up.
This commit fixes the styles of this view.
closesodoo/odoo#96949
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit:
When the page is expanded and try to add any block with an image, try to change
the image using replace button. It lands the user at the top of the page instead
of staying image place.
After this commit:
The user will stay at the image place after clicking on replace button.
Task-2753302
closesodoo/odoo#97266
X-original-commit: da4fdd90622b1f6ba2e45e717fcb4fdde09033af
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The "plain text" template instantiated the regular web_editor.wysiwyg
rather than its specific override for mass_mailing. As a result, it
didn't include certain customizations like commands that should be
overridden for mass_mailing.
task-2715295
closesodoo/odoo#94434
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The codeview of mass_mailing had the wrong height in non full-width
contexts.
task-2894177
closesodoo/odoo#96342
X-original-commit: ee001e843a0a02f04030f0959c7db58beaaa3a3b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
> Media query mixins parameters have changed for a more logical approach
> media-breakpoint-down() uses the breakpoint itself instead of the next
> breakpoint (e.g., media-breakpoint-down(lg) instead of
> media-breakpoint-down(md) targets viewports smaller than lg).
> Similarly, the second parameter in media-breakpoint-between() also
> uses the breakpoint itself instead of the next breakpoint (e.g.,
> media-between(sm, lg) instead of media-breakpoint-between(sm, md)
> targets viewports between sm and lg).
https://getbootstrap.com/docs/5.1/migration/#sass
Task ID: 2766483
Part-of: odoo/odoo#95450
It seems louche to use media-breakpoint-between(lg, xl,
$o-extra-grid-breakpoints) as in $o-extra-grid-breakpoints there is an
XXL value.
In short, in XXL mode the padding fallback to the value outside the
breakpoint (twice smaller).
e.g. result in CSS
```css
.o_form_view .o_form_sheet_bg > .o_form_sheet {
padding-right: 16px;
padding-left: 16px;
}
@media (min-width: 992px) and (max-width: 1533.98px) {
.o_form_view .o_form_sheet_bg > .o_form_sheet {
padding-right: 32px;
}
}
@media (min-width: 992px) and (max-width: 1533.98px) {
.o_form_view .o_form_sheet_bg > .o_form_sheet {
padding-left: 32px;
}
}
```
Part-of: odoo/odoo#95450
- BS5 JS use the `data-bs-toggle="dropdown"` attribute to
automatically enable the BS Component.
But in this case as the `.dropdown-menu` is only rendered when the
`.dropdown-toggle` is clicked we can't initialize the Dropdown at the
first render. So we do it manually.
- change .dropdown-menu by .o-dropdown-menu (owl)
-> to handle keyboard navigation we can't use BS dropdowns
- use currentTarget of event
As the event can bubble we use currentTarget to be sure to be at the
higher level in the DOM.
> All the events for the dropdown are now triggered on the dropdown
> toggle button and then bubbled up to the parent element.
- BS5 don't add .show on parent group anymore
-> dropdown show class not on the same node on BS5
- avoid dropdown warning using margin in CSS
BS5 show a warning if we use margin statically in CSS for a dropdown.
> Popper: CSS "margin" styles cannot be used to apply padding between
> the popper and its reference element or boundary. To replicate margin,
> use the `offset` modifier, as well as the `padding` option in the
> `preventOverflow` and `flip` modifiers.
- adapt the systray activity dropdown for mobile
On desktop positions are now dynamic and on mobile it's static
- In BS5 the CSS `bottom: 100%;` is not more applied to the
`.dropup .dropdown-menu` selector.
- Change right -> end and add data-bs-popper="none" to avoid
Popper interaction
Task ID: 2766483
Part-of: odoo/odoo#95450
Before the commit
Go to Email Marketing > Mailing Lists
The kanban cards are visually misplopped.
After the commit
Style is fixed
closesodoo/odoo#95387
Related: odoo/enterprise#29152
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Odoo-Editor, having originally been developed with the purpose of being
a standalone library, was put into a `lib` folder. Since in the meantime
the library plans were aborted and since its presence outside the `src`
directory makes translations unavailable for it, this moves the editor
to `src/js/editor/odoo-editor`.
task-2880723
Part-of: odoo/odoo#94516
Before this commit
When the user hit ctrl+k on a mass mailing, no command palette nor link
dialog was opening.
This was due to the fact that the hotkey service would not react
to hotkeys being pressed from inside of an iframe element.
After this commit
One can now register an iframe to the hotkey service to let it react
to hotkeys being pressed from within the registered iframes.
task-2738457
closes odoo/odoo#91102
Forward-port-of: #89940
Forward-port-of: #82994
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
*: mass_mailing, web, web_editor, website_blog, website_event,
website_event_meet, website_livechat, website_sale, website_twitter,
base
This commit does 3 things:
- Adapt existing code so that the editor can be run outside of its
editing element. Prior to this commit, it was expected that the
editor would be attached to the element it was currently editing.
This needs to change however as the editable is now inside an
iframe for the website edition. mass_mailing already had a similar
approach but the editor was started within the iframe.
With these changes, the editor is alongside the iframe, editing
the content that's inside it. This allows multiple features
such as reloading the iframe while keeping the editor visible and
resizing the iframe for a mobile preview.
- Adds logic to the wysiwyg_adapter so that it can undertake
the duty of the previous widget sytem. The wysiwyg existed not only
in the legacy widget system, but most importantly in the frontend.
One of the duties of this adapter is to send events inside the
iframe when it is necessary to reach the frontend public widget
(i.e. widgets_start_request)
- Removes existing SCSS that is no longer used.
See merge commit for more information.
task-2687506
Before this commit, in the editable form view of mass mailing, the
emoji widget is outside of the subject field, which is not optimum.
This issue was re-spawned after a recent commit that enabled saving
the mailing as a template, which changed the layout to add a star
next to the subject field.
With this commit, emoji widget is now inside the subject field.
task-2826521
closesodoo/odoo#92672
X-original-commit: 09991b477353e6167d576779b7364408b2109cd6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Reorganize addon according to guidelines, helping finding and updating
SPECIFICATIONS
Reorganize templates in order to see a bit what's going on here. Notably split
subscription (opt-out, blacklist) from management (view, reporting) templates.
Reorganize controller code by main section in order to separate a bit various
code purpose.
This commit contains only file split / renaming and code move.
Task-2864264 (Mass Mailing Module Reorganization)
Part-of: odoo/odoo#92509
If you do not have favorite filters available in the mass mailing for
selected model, we display empty drop down, which is not ideal.
This commit improves the behavior with following changes:
- If there is no filter available (for this target) and no condition
set in the mailing domain, do not display anything
- If mailing domain is set but there is not filter available, show a
custom label "Save Filter as Favorite" save icon next to it
Ent PR: https://github.com/odoo/enterprise/pull/26308
task-2711258
closesodoo/odoo#87673
Related: odoo/enterprise#26308
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
There was an issue when a mailing save failed: the edited body of the mailing
was lost.
Impacted versions:
- 15.0 and higher
Steps to reproduce:
1. Create a mailing "Start from scratch" and add some elements
2. Do not fill in the subject (or at least one required field)
3. Save (it should fail because of the empty required field)
Current behavior:
- The edited template is lost
Expected behavior:
- Keep the edited template even if the save failed
This commit fixes the problem by properly awaiting the promise _doAction so that
the field's value will be set correctly.
The testing tour `mass_mailing_editor_tour` is updated to check that the
body_arch is kept after a failed save.
This issue was introduced in 15.0 with:
95754eb6a4
Task-2856742
closesodoo/odoo#92186
X-original-commit: bc81178d541587f757d76932449d35ed426699aa
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The design tab allows the customization of the separators' colors but
this is currently broken because it gets overridden by the default style
of the snippet, which has higher specificity.
Besides, the priority of styles was lost.
closesodoo/odoo#92174
X-original-commit: 098202ba584ca6ba3544ccd00397578f5deb12ad
Related: odoo/enterprise#27719
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Since background-image elements and their children will be flattened
into images, links within them won't work. This removes the link button
of the editor toolbar, as well as the link and button commands in those
contexts.
task-2856858
Part-of: odoo/odoo#91314
There are two ways of editing links: the link tools (in the sidebar) and
the link dialog. In `mass_mailing`, the link tools were in the sidebar
but using the link command of the Powerbox opened the link dialog. This
makes it so only one mechanism is in use (the link tools).
task-2856858
Part-of: odoo/odoo#91314
When the first snippet in a mail is for example a cover image,
the html2canvas library exports the image with a white line along the
top caused by the negative top margin on the iframe.
task-2856858
Part-of: odoo/odoo#91314
When importing snippets from `website` to `mass_mailing`, the styles for
`.o_bg_img` were not carried over. This makes the image of the `Masonry`
snippet size poorly. This duplicates that scss into mass_mailing.
task-2856858
Part-of: odoo/odoo#91314
The default values of borders for buttons were not properly parsed in
the design tab because they come from the `btn` class, which was not
part of the selectors for buttons in the design tab. The fake element
created to get computed styles therefore didn't have that class and thus
didn't have a border value.
The separator width value was also broken whenever it was "auto" since
we're expecting values of "25%", "50%", "75%" or "100%". This interprets
"auto" as equivalent to "100%" in all cases.
closesodoo/odoo#92138
X-original-commit: 56521a69d9cb61ec726722a2b102150bb1714070
Related: odoo/enterprise#27708
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
`wWebsite`'s `s_hr` snippet css targets the same element as
`mass_mailing`'s `hr` snippet, resulting in interferences. This raises
the speciticity of `mass_mailing.s_hr`'s css to counter that issue.
X-original-commit: 112758b7c07870c5d002a87f4eed58bd8feb9bee
Part-of: odoo/odoo#92138
Remove default styles which remove underlines on links.
Add global styling for theme_default.
X-original-commit: 4ec9847057d9888820c3d9b1b068e3658e80acd4
Part-of: odoo/odoo#92138
Separator widgets were not centered by default which looked weird when
we resized them with the design tab.
task-2821155
X-original-commit: 60190e283e4c75bb6480ba37b8c2ccf4246cf769
Part-of: odoo/odoo#92138
When styling a theme in XML, we don't have access to the top of
`.o_layout`, leading to the design element being located in different
places depending on whether it's been added programmatically or in XML.
This harmonizes it, ensuring it's always at the top of `.o_layout`.
X-original-commit: ab61f1d38b2852ec0b6727122a1cfc2cd81cfc9f
Part-of: odoo/odoo#92138
When changing a font-family style in the design tab, we need to make
sure we don't override the font-family of font awesome icons or it will
break them. This takes font-family out of its selector and applies
it to special selectors that exclude `.fa`.
task-2821155
X-original-commit: d25b38969d1d0f2f791ad33f2591ea4f3b7b5ed8
Part-of: odoo/odoo#92138
Some styles added by the design tab require the use of the 'important'
keyword. Prior to this that keyword was added to all styles of a
selector that contained at least one priority style.
task-2821155
X-original-commit: e41de41c6f1e8d3f34368e191b9debc03c57ab05
Part-of: odoo/odoo#92138
When adding a font-family style, we need to make sure it trickles down
to all its descendants. This implies adding selectors with a trailing
`*` to the selectors involved. The way it was done was
undiscriminatingly, leading to selectors ending in `* *`, which is
obvious non-sense.
task-2821155
X-original-commit: bb8685cc9829ab0e76d98c4c1196a344d2475759
Part-of: odoo/odoo#92138
Purpose
=======
This commit rework the design of the Kanban view of the mailing list.
There are now 2 styles for this Kanban view
- Grouped, for this one we keep the same "card design" as before
- Ungrouped, we use a "list style" view, and the card take the all
width of the screen
Add some actions to be able to import quickly contacts from this view
or to send a mailing to the mailing contact list.
Task-2737782
closesodoo/odoo#86587
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>