Commit Graph
651 Commits
Author SHA1 Message Date
Pierre-Yves Dufays ac67e6a8df [IMP] base,{fetch}mail,l10n_it_edi,{test}mass_mailing:prevent using arch server
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

closes odoo/odoo#91240

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-01 15:32:44 +02:00
Denis Ledoux 8b91cab67f [IMP] base: remove groups_id from ir.ui.view
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
2022-08-29 22:42:50 +02:00
Sébastien Geelen (sge) d32a8c53c2 [IMP] web,web_editor,mass_mailing,sms: new dynamic placeholder
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

closes odoo/odoo#71878

Related: odoo/enterprise#30333
Related: odoo/upgrade#3766
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-26 17:16:10 +02:00
Sébastien Geelen (sge) 1a82c91524 [IMP] mail,sms,mass_mailing_*: remove dynamic placeholder tab
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
2022-08-26 17:16:09 +02:00
Denis Ledoux 0501bbd62e [IMP] base: uniform "groups" in back-end view
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.

closes odoo/odoo#95729

Related: odoo/enterprise#29592
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-08-19 19:10:39 +02:00
David Monjoie 4b31c2f065 [FIX] mass_mailing: update showcase snippet to bs5
closes odoo/odoo#98247

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-17 12:45:17 +02:00
ijas ahammed 080efbb9d2 [IMP] mass_mailing: shorten action button string
This commit shortens the action button string from 'Send new Mailing'
to 'Send Mailing' in campaign form view

TaskID-2653806

Part-of: odoo/odoo#77768
2022-08-12 11:28:31 +02:00
ijas ahammed 0714966042 [IMP] {mass_mailing}_sms: add A/B Test related info in campaign
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
2022-08-12 11:28:31 +02:00
ijas ahammed 87e538dd1d [IMP] {mass_mailing}_sms: update the embed tree view on campaign
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
2022-08-12 11:28:31 +02:00
Elisabeth Dickinson 715e73b01e [IMP] mass_mailing: add padding-x option to snippets
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
2022-08-11 17:56:26 +02:00
Elisabeth Dickinson a559fe4aae [MOV] mass_mailing: rename, move and remove images
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
2022-08-11 17:56:25 +02:00
Elisabeth Dickinson 73160feed7 [IMP] mass_mailing: revamp of the event snippet
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
2022-08-11 17:56:25 +02:00
Elisabeth Dickinson 2815fe0807 [IMP] mass_mailing: remove data-snippet attribute on snippets
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
2022-08-11 17:56:25 +02:00
Elisabeth Dickinson d5c7f2b208 [IMP] mass_mailing: title snippet improved
Bootstrap text align class is replaced with inline style

Part-of: odoo/odoo#95940
2022-08-11 17:56:24 +02:00
Elisabeth Dickinson 128e3baca8 [IMP] mass_mailing: text_highlight snippet improved
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
2022-08-11 17:56:24 +02:00
Elisabeth Dickinson 14ee23fa0a [IMP] mass_mailing: text_block snippet improved
Remove unnecessary classes

Part-of: odoo/odoo#95940
2022-08-11 17:56:24 +02:00
Elisabeth Dickinson bffada1463 [IMP] mass_mailing: showcase snippet revamped
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
2022-08-11 17:56:24 +02:00
Elisabeth Dickinson b52806fcf0 [IMP] mass_mailing: references snippet improved
Replace bootstrap class for text alignment with inline style

Part-of: odoo/odoo#95940
2022-08-11 17:56:23 +02:00
Elisabeth Dickinson f6c49e8c40 [IMP] mass_mailing: rating snippet improved
Changed `h4` to `h3`.
Removed padding when inside another snippet which already has its own
padding.

Part-of: odoo/odoo#95940
2022-08-11 17:56:23 +02:00
Elisabeth Dickinson 2a29f373f0 [IMP] mass_mailing: product_list snippet improved
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
2022-08-11 17:56:23 +02:00
Elisabeth Dickinson fd22c5f974 [IMP] mass_mailing: picture snippet improved
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
2022-08-11 17:56:23 +02:00
Elisabeth Dickinson 125bf5552e [IMP] mass_mailing: numbers snippet improved
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
2022-08-11 17:56:22 +02:00
Elisabeth Dickinson e4cb8959cb [IMP] mass_mailing: media_list snippet improved
Padding improvements and removal of margin-bottom as this can't be done
with the builder.

Part-of: odoo/odoo#95940
2022-08-11 17:56:22 +02:00
Elisabeth Dickinson cd65d800b4 [IMP] mass_mailing: image_text and text_image snippets improved
Replaced bootstrap classes by inline styles.
Added .o_cc on columns to allow background color edition with builder.

Part-of: odoo/odoo#95940
2022-08-11 17:56:22 +02:00
Elisabeth Dickinson 46b527f9f7 [REM] mass_mailing: footer_tag_line snippet removed
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
2022-08-11 17:56:22 +02:00
Elisabeth Dickinson 66cc95830d [IMP] mass_mailing: features snippet improved
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
2022-08-11 17:56:21 +02:00
Elisabeth Dickinson 1789d2d505 [IMP] mass_mailing: features_grid snippet improved
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
2022-08-11 17:56:21 +02:00
Elisabeth Dickinson 577e3fc1b5 [IMP] mass_mailing: coupon_code snippet improved
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
2022-08-11 17:56:21 +02:00
Elisabeth Dickinson b0ba58ede3 [IMP] mass_mailing: comparisons snippet improved
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
2022-08-11 17:56:21 +02:00
Elisabeth Dickinson 9bdbb4440d [IMP] mass_mailing: company_team snippet improved
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
2022-08-11 17:56:20 +02:00
Elisabeth Dickinson f2cb22cab0 [IMP] mass_mailing: color_blocks snippet improved
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
2022-08-11 17:56:20 +02:00
Elisabeth Dickinson f8b3782b44 [IMP] mass_mailing: call-to-action snippet improved
General improvements and removal of btn-block class as this is not
an option with the builder.

Part-of: odoo/odoo#95940
2022-08-11 17:56:20 +02:00
Elisabeth Dickinson 9c7264fb48 [IMP] mass_mailing: blockquote snippet improved
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
2022-08-11 17:56:20 +02:00
Elisabeth Dickinson 7eda17fd4d [IMP] mass_mailing: alert snippet improved
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
2022-08-11 17:56:19 +02:00
Elisabeth Dickinson bc48e48528 [IMP] mass_mailing: o_discount1 snippet improved and updated
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
2022-08-11 17:56:19 +02:00
Elisabeth Dickinson 2e3ecc52b5 [IMP] mass_mailing: header snippets improved
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
2022-08-11 17:56:19 +02:00
Elisabeth Dickinson 8db441a283 [IMP] mass_mailing: improve theme_default and default SCSS
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
2022-08-11 17:56:18 +02:00
Elisabeth Dickinson 7b370d28f7 [IMP] mass_mailing: amend icons alignment
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`.

closes odoo/odoo#95974

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-09 11:32:08 +02:00
Elisabeth Dickinson f4995f5600 [IMP] mass_mailing: adapt snippets with rounded images
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
2022-08-09 11:32:07 +02:00
Elisabeth Dickinson 24a4c7f897 [IMP] mass_mailing, web_editor: add basic img shapes, remove img Style
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
2022-08-09 11:32:07 +02:00
Michael (mcm) 1bbdeb1456 [FIX] mass_mailing: fix form view styles
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.

closes odoo/odoo#96949

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 20:10:54 +02:00
stefanorigano (SRI) 56064ff1e4 [REM] *: drop oe_clear class in favor of clearfix bootstrap default
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:14 +02:00
qsm-odoo 29613c6ec4 [FIX] web_editor: fix the look of the indent symbol in the editor panel
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 &emsp;
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.

closes odoo/odoo#97361

X-original-commit: e5d45643598671077ade7e41f0dbfe2b502665b8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-04 11:45:31 +02:00
Stefan-Calin Crainiciuc (stcc) 08420e9d84 [FIX] mass_mailing: Create mass mailing without logo
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

closes odoo/odoo#97326

X-original-commit: edda787471d539e9e32ab0dfe4f15235dacec48d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: stcc-odoo <stcc@odoo.com>
2022-08-03 15:09:41 +02:00
Younn Olivier cd2a649b8b [FIX] web, mass_mailing, website: remove frontend debug icon
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

closes odoo/odoo#95499

Related: odoo/upgrade#3721
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-07-29 15:53:12 +02:00
MAHAMADASIF ANSARI 6807eea38c [FIX] various: display full name/title in form views
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

closes odoo/odoo#96132

X-original-commit: 4a74c7af6b54bd771f50d3885813f4aae442c9e7
Related: odoo/enterprise#29552
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-07-18 18:42:03 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli a10d6bb9eb [REF] *: BS5: use text-bg-#{$color} to keep the contrasted text color
In BS5 `bg-#{$color}` don't set the color of the text. So in some case
the color is not the right one.

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:22 +02:00
Bruno Boi eca8f0b0bb [FIX] mass_mailing: ungrouped kanban layout issue
Before the commit
Go to Email Marketing > Mailing Lists
The kanban cards are visually misplopped.

After the commit
Style is fixed

closes odoo/odoo#95387

Related: odoo/enterprise#29152
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-07 09:06:58 +02:00
Victor Feyens fba6ea5a47 [IMP] *: do not force admins to be app admins
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
2022-06-23 23:48:29 +02:00