Prevent archiving in-use mail servers by displaying an error message that
lists where it is still used, allowing to easily identify what need to be
updated before being able to archive the mail server.
Additionally,
- prevent the use of archived server as a fall-safe
- when duplicating a mailing with an archived mail server, replace mail
server by the default one
Detailed explanation:
1. A check has been added that raise an exception when trying to connect to the
smtp server or send an email when the server is archived.
With that solution,
- testing the connection of an archived server displays an error telling that
an archived server cannot be used.
- if a mail is still sent with an archived server, mail are in error :
"Connection failed (outgoing mail server problem)"
This fail-safe ensures that no mail will be sent through an archived mail server
and that the user will get some feedback about it.
The same fail-safe for the incoming mail server has been added.
Notes:
- the connection will outlive the archiving of a mail server still allowing
to send email through the archived server until the connection is closed. But
connection are not kept for long so this shouldn't be a problem.
- it cannot be tested because the connect method return immediately in test
mode.
2. When a mail server is archived, an user error is raised if it is in-use.
The implementation relies on each module to override the method
"_active_usages_compute" in "ir_mail_server" to complete the list with
user-friendly message describing the active elements that could send mail
through the mail server. This has been implemented for:
- l10n_it_edi: server used to send e-invoice
- mail: optional server configured for template
- mass_mailing:
-- default mail server
-- active server configured for mailing
Mail server are referenced in other elements but are not active anymore, it is
just for temporary or history purpose. Those references doesn’t prevent the
archiving of the mail server:
- mail_message
- wizard survey_invite and compose_message
- res_config_settings
Task-2821516
closesodoo/odoo#91240
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The goal of this revision is to get rid of the `groups_id` field of the model `ir.ui.view`.
- This feature wasn't really known or used by most developers,
and not straight-forward to understand.
Removing it allows one less complicated thing to learn for developers.
Besides, thanks to odoo/odoo#95729,
changing the behavior of the `groups=` attribute,
we can easily get rid of this `groups_id` feature
by simply adding `groups=` in the elements of the views
using the `groups_id` field, it will have the same effect:
adding the elements in the view only for the users part of the specified group.
- By getting rid of the groups_id many2many field on ir.ui.view,
it makes possible to cache the view architecture without
requiring to use the groups in the cache key.
Currently, if we want to cache the view architecture,
it would be required to use the intersection of the user
groups with the groups_id groups of the view,
making it costly to compute the cache key,
therefore altering the performance point to cache the view
architectures.
Part-of: odoo/odoo#98551
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>
We remove the existing dynamic placeholder generator tab,
in mail and sms creation views.
In preparation of the implementation of a new way to generate
the dynamic placeholders
task-2154624
Part-of: odoo/odoo#71878
This revision is to make uniform the behavior of the `groups` attribute
on the Python model fields
and on the node in the view architecture.
In both cases, remove the node from the view completely.
Before this revision,
in a back-end view:
- In the Python model, if a field has the `groups` attribute set
and the user is not part of
the groups, the field is removed, completely, from the view.
- In the view architecture, if a node has the `groups` attribute set
and the user is not part of
the groups, the node is made invisible (not completely removed, just
made invisible).
in a front-end view:
- if a node has a "groups" or "t-groups" set and the user
is not part of the groups, the node is removed from the view.
So it's 2/3 cases removing nodes restricted to a group.
and 1/3 case making invisible nodes restricted to a group.
It's simpler to have a uniform behavior for the 3 cases,
simpler to understandard for developers.
In addition, this will help for the goal to cache back-end views.
It makes possible to convert views using the `groups_id` field
by moving the content of these views directly
in the view to which they add content which is suppose to be completely
removed when the user has not the according group.
By getting rid of the `groups_id` many2many field on `ir.ui.view`,
it makes possible to cache the view architecture without
requiring to use the groups in the cache key.
Currently, if we want to cache the view architecture,
it would be required to use the intersection of the user
groups with the `groups_id` groups of the view,
making it costly to compute the cache key,
therefore altering the performance point to cache the view
architectures.
closesodoo/odoo#95729
Related: odoo/enterprise#29592
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
This commit adds a new group `ab_test_group` after notebook of campaign form
view, which displays A/B test related information. Below are the fields
displayed within the group:
- ab_testing_winner_selection
- ab_testing_schedule_datetime
They will become readonly as soon as the the A/B testing is completed.
Apart from that, this commit makes the mailing/sms mailing lines editable.
TaskID-2653806
Part-of: odoo/odoo#77768
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
An extra option is added in order to have control over the paddings.
Snippets using the `px-3` class have had it replaced with inline styles
and now have the padding option in the builder.
This was initially done for the media_list snippet, but it seems it's
useful for many more snippets.
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
We shouldn't add a data-snippet in the declaration of a snippet,
as they are meant to be drag & dropped, the editor/right panel is going
to add that for you. We generally add them when we copy paste a snippet
definition into another view directly in our sources (ie: template)
Ref: https://github.com/odoo/odoo/pull/87059#discussion_r866903584
Part-of: odoo/odoo#95940
Replace bootstrap class for text alignment with inline styles
Remove Horizontal alignment on whole snippet to allow individual
alignment on <h3> and <p> elements.
Part-of: odoo/odoo#95940
There used to be a middle column to allow for a border between
the two columns, but this was selectable (not editable) with the mailing
builder.
`.o_no_editable` or other similar classes didn't seem to work.
Instead, the snippet has been revamped by removing the middle column and
adding a right border to the second column on each row.
This border is not yet editable in the builder, so the user cannot
adapt the width/color/style yet.
Bootstrap classes for text alignment have been replaced w/ inline styles
Part-of: odoo/odoo#95940
Replaced bootstrap classes by inline styles and removed
`.o_default_snippet_text`.
Wrapping the `<a>` in a `<p>` allows the user to align the button
separately from the text.
On mobile, the columns are stacked, the paddings top and bottom are thus
moved to the columns to allow top and bottom spacing between them.
Part-of: odoo/odoo#95940
Replaced bootstrap classes by inline styles and removed unused
`.figure-caption` class.
Allow columns and give image `max-width: 100%`
As the "thumbnail" option (in the image's Style option) is to be removed,
the `.img-thumbnail` class has been removed from the image.
The result can be done with the "padding" option already available on
images and the "border" widget that is to be added for its border-radius
option.
It is only missing a background-color to get the same result as the
styling given with the removed `.img-thumbnail` class.
Note: The styles are directly applied to the image element but Outlook
would need the styles to be applied to a wrapping element instead.
Outlook doesn't support styling directly on images.
Part-of: odoo/odoo#95940
Replaced bootstrap classes by inline styles and removed
`.o_default_snippet_text` and `.s_number` classes which aren't needed.
`<h5>` is no longer supported, it's been changed to `<p>`.
Added `.o_cc` on columns to allow background color edition with builder.
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
Replaced bootstrap classes by inline styles. Added .o_cc on columns to
allow background color edition with builder.
Mobile stacks the columns, the paddings top and bottom are thus moved to
the columns to allow top and bottom spacing between them.
Part-of: odoo/odoo#95940
Replaced bootstrap classes by inline styles and removed unused classes.
`<h4>` and `<h5>` are no longer supported, these have been changed to
`<p>` or `<h3>`.
Added .o_cc on columns to allow background color edition with builder.
Part-of: odoo/odoo#95940
Replace bootstrap classes by inline styles.
Added a <p> around the ENDOFSUMMER20 text so it can be edited with the
design-tab along with other text.
A `.o_mail_no_margin` class is added to the <p> element otherwise the
text isn't vertically centered inside the the table cell.
Part-of: odoo/odoo#95940
Removed unnecessary classes and replaced bootstrap classes with inline
styles.
Removed `.btn-block` classes because it isn't an option supported
by the builder.
The `<li>`'s `.list-group-item` class overrides the design-tab's text
color. For this particular case, the list elements have a `<p>` added
around the text.
When selecting text inside the second block's list and backspacing,
the line would become purple and impossible to remove. This was probably
due to the text being inside a <span> inside a <p> (this issue isn't
present in the first block which only contains <p> elements).
Part-of: odoo/odoo#95940
Placed all the columns in a single row, litmus tests approve.
Removed unnecessary classes which prevented to move columns around and
add background colors to the columns.
Also changed all `<h4>`s into `<h3>`s
Part-of: odoo/odoo#95940
Replace bootstrap class for text alignment with inline style
Wrapping the `a` inside a `p` and placing the text alignment on the `h2`
and `p`s allows the user to align the elements individually.
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
Column classes have been updated and outdated classes ones have been
removed.
Paddings have been improved for better display on mobile.
Part-of: odoo/odoo#95940
Previously, the social icons column could not be resized and we couldn't
change their alignment. This is now possible by removing the extra div
surrounding the social links.
A general cleanup has been done.
The order of the classes is more consistent.
Unused classes (ie: `o_mail_table_styles`) have been removed.
Text-align classes have been replaced by inline styles.
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
Since removing the "Styles" option and the CSS that went with it,
there is an issue with the center alignment on icons.
Indeed, having a fixed width/height value on `fa.rounded` allowed the
icon to be centered along with its background.
By removing the fixed with/height values, the center alignment
(using `.mx-auto` and `.d-block`) would center the icon but stretch the
background color to the full width of the parent.
To achieve the same result, the cheat is to set the
default value of the wrapping block to text-center and remove
`.mx-auto` and `.d-block`.
closesodoo/odoo#95974
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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
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>
As a stable fix, to not touch XML templates and break existing
translations, the ⌙ character was automatically replaced by └ which
makes more sense for the usecase and should work properly in all
browsers. The ⌙ character is actually rendered mirrored on Windows 11
Chrome (and others) as the font used for those unicode characters is
left to the browser. We could force a font of our own but it's probably
not worth it.
A better solution with a SVG or CSS solution has to be done in master.
That would unify the look of the symbol across all browsers and
also prevent special characters to be placed in translations.
With this forward-port commit, we'll start first by using └ via a CSS
rule. Three new classes have been created: o_we_sublevel_1,
o_we_sublevel_2 and o_we_sublevel_3. Adding any of them on a widget
automatically adds the └ character. Then choosing 1, 2 or 3 controls
the indentation, which was previously controlled by placing the  
HTML entity directly inside strings.
This commit also takes the opportunity to fix some of those level
indentations (sometimes 2 was used instead of 1 or 1 was used instead of
2, etc) and also review some related labels.
closesodoo/odoo#97361
X-original-commit: e5d45643598671077ade7e41f0dbfe2b502665b8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Steps to reproduce the bug:
- Let's consider a company c and a user in this company u.
- Delete the logo of c
- Go to mass mailing > Create
Bug:
Traceback is raised
opw-2927807
closesodoo/odoo#97326
X-original-commit: edda787471d539e9e32ab0dfe4f15235dacec48d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: stcc-odoo <stcc@odoo.com>
After [1] moved the website edition in the backend, we feel that the
code required to make the additional debug icon in the footer of the
frontend still work is not worth it.
Before this commit, on a website page, it was not working: clicking on
it from the WebsitePreview client action would only remove the debug
mode of the frontend, and the backend would keep it.
The user can now leave the debug mode from the debug menu systray item
and we consider that leaving debug mode as a visitor (from the
frontend) is not a feature worth keeping.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
closesodoo/odoo#95499
Related: odoo/upgrade#3721
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
With commit[1], we added `o_text_overflow` classes at several places to avoid
long names going out of the boxes. However, for the name/title fields in the
form views, we should always show the full name.
So this commit replaces `o_text_overflow` class with `text-break` from
name/title fields in the form views to display full string in the read
only mode, but also keep them from going outside of the form view.
Below are the modules affected:
- base
- coupon
- crm
- event
- mass_mailing
- mass_mailing_sms
- project
- sales_team
commit[1] - a0ebb46
task-2889845
closesodoo/odoo#96132
X-original-commit: 4a74c7af6b54bd771f50d3885813f4aae442c9e7
Related: odoo/enterprise#29552
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
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>
For bugfix purposes, app administration groups have been given to
(implied by) the "Settings" group because without those rights,
opening/saving the settings crashed.
1) Do not load hidden view content
This commit uses the conditional inheritance of views
(depending on user groups) to avoid loading unnecessary view
& record content client-side.
This improves performance for admins without the specific application
admin rights, but also fixes the main bugfix problem,
caused by the webclient querying name_get for the records in relational
fields content.
Example:
sale_management adds a res.config.settings field to specify
the default sale.order.template for the current company.
If a 'Settings' user without 'sale.group_sale_manager' opens the
settings, he won't see this setting, but if a default template is
specified for the current company, the webclient will still request
the name_get of this template to the server, because the field
was present in the view, only hidden with a groups attribute.
With this commit change in sale, the field won't be in the view unless
you have the Sale manager group, avoiding the error/traceback/bug.
2) Remove implied application administration groups
Do not force the specific application groups on all 'Settings' user,
they globally do not need those rights, and if they need it, they
can add it to their account themselves.
3) Add a test to make sure settings user are able to manage settings.
4) Enforce 'settings' -> 'access rights' -> 'internal user' groups
As the previous test highlighted some 'false positives' because
it considered a settings user unable to read `crm.team`
and `stock.warehouse` records, we also took the opportunity to enforce
the fact that 'Settings' & 'Access rights' users must be internal users.
It makes no sense for a portal/public user to have access to the
settings, and didn't work anyway.
Part-of: odoo/odoo#91909