Commit Graph
709 Commits
Author SHA1 Message Date
Brieuc-brd 390ec46c8d [FIX] mass_mailing: alert height and position
Prior to this commit, alert was in the status bar. To maintain
consistency and avoid alert being in a dropdown in mobile, alert should
be below the status bar.

There was also a height issue that created a too high alert in
`mass_mailing_sms`.

This commit fixes these issues.

task-3468540
Part of task-3326263

closes odoo/odoo#132753

X-original-commit: da9d1c5e146fe0370204d3330cf3d876a98f5753
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-08-23 10:03:34 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Antoine (anso) 59828459ad [IMP] mass_mailing: restore sheet
This commit restores the sheet layout in mass_mailing for consistency
reasons.

The chatter was extracted from the tab it was in and moved back on
the right side.

This commit also fixes an alignment problem when an alert is displayed
and the alert was vertically bigger that the buttons of the status bar

task-3355071

closes odoo/odoo#130616

Forward-port-of: https://github.com/odoo/odoo/pull/126646
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-08-03 19:31:36 +02:00
Aaron Bohy 9d81cff6fd [REF] *: remove always_reload many2one option from archs
This option is no longer necessary since [1] as the value is now
reloaded by default.

[1] odoo/odoo#114024
Part of task~3179751

closes odoo/odoo#130169

Related: odoo/enterprise#44838
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 09:40:55 +02:00
Julien Carion (juca) 6c412be2ea [IMP] *: coherent hotkey uses
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.

task-3370463

closes odoo/odoo#127469

Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:15 +02:00
Julien Carion (juca) 731db3d459 [IMP] web, mass_mailing: make domain field foldable
This commit allows the domain field to become foldable such that it will
display its domain in the form of facets (similar to the search bar's
ones) when it is folded. Also applies this functionality directly to the
mass_mailing form view.

task-3339512

closes odoo/odoo#126789

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:07 +02:00
Nicolas Bayet d7245d2abf [REF] web_editor,*: convert wysiwyg to owl
The goal of this commit is to remove all dependency to legacy in the
wysiwyg because the wysiwyg has to be loaded on a lot of form view
(through the html_field).

To remove the dependencies, all the legacy widget that the wysiwyg
uses had to be converted to owl. In order to finish the PR faster,
only a partial conversion of the widgets is done, changing only the
part of the code that was necessary for it to work instead of
rewriting the whole widget from scratch. Another pass should be done
to convert all those widgets to fully embrace the owl paradigm.

task-3175256

Part-of: odoo/odoo#118966
2023-07-19 11:39:44 +02:00
Pratik Raval ee31690988 [FIX] mass_mailing{_sms}: fix A/B testing description
Before this commit
- When we were creating an alternative version in the SMS app for A/B
  testing, we were not able to see different options like select
  winner, compare version, etc in it because of ab_testing_mailings_count
  was counting only records with type equal to mail, in method
  _compute_mailing_mail_count. So, count will never increase
  and those buttons will never be visible.
- We were not able to sent the mail manually in auto mode.
- We were able to see the 'Send winner Now' and 'Send this as Winner'
  buttons even if no a/b test mail were send.

So, with this commit
- We have added the ab_testing_sms_count compute field in utm.campaign
  and ab_testing_sms_count related field in mailing.mailing to deal
  with the above problem.
- The auto mode can now send a winner manually.
- We introduce a new compute field is_ab_test_sent for computing
  whether the any sibling mails of a/b testing are sent or not,
  depending on that we hide / show buttons.

TaskId-2713198

Part-of: odoo/odoo#88997
2023-07-17 12:05:48 +02:00
Pratik Raval 06c70b5913 [IMP] mass_mailing: improved recipients warning
Part-of: odoo/odoo#88997
2023-07-17 12:05:47 +02:00
Elisabeth Dickinson f9bf456ba9 [FIX] mass_mailing: move buttons up on tablet and fix their spacings
The buttons on the Mailing Lists page were under the content and felt
weirdly placed. These have been moved up on smaller devices to be next
to the Total Contacts column, making the visual result more balanced.
Note that these buttons are only visible on tablet and desktop, not
mobile.

The buttons' spacings have been fixed so as to not touch one another.

This commit also fixes the padding on either side of the ungrouped
Kanban card to be aligned with the control panel.

task-3378519
part of task-3326263

closes odoo/odoo#127613

X-original-commit: 8c4dbaa37cccda6a5af5e9c5be216e69ecd4227d
Related: odoo/enterprise#43762
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-06 20:55:58 +02:00
Deependra Solanki 3157b8e50a [IMP] mass_mailing: enable font-family customisation for buttons and links.
Before this commit:

The font-family style of buttons and links could not be changed.

After this commit:

The fonts of a buttons and links can be changed.

Task - 2841732

closes odoo/odoo#121926

Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-06-26 20:00:50 +02:00
Deependra Solanki bbf14a9fff [FIX] mass_mailing: added 1rem padding top to footer
Before this commit:

The mass mailing footer had no padding top.

After this commit:

Added 1rem / 16px of padding top to the footer.

Task - 3323881

closes odoo/odoo#125989

X-original-commit: 2085057a17409f4e1c33728b709cedbf23146b2b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-22 09:50:38 +02:00
Chrysanthe (chgo) 1347909ede [FIX] mass-mailing, website_*: fix some .btn-secondary border
== ISSUE ==

With the new design introduced within Milk, most of the buttons received
a visual upgrade (eg. removing borders)

This change applied on most of the buttons since the same code, but some
buttons were using a `.border` class on top of that and so they did not
loose this border.

== After this commit ==

We clean up these buttons that were keeping a border, in order to make
our secondary buttons more consistent.

Please note that this change does not apply on all secondary buttons
since some of them are customized for a specific module and so remain
unmodified.

task-3326313
part of task-3326263

closes odoo/odoo#121990

X-original-commit: b2e338666f59a1c40e4dcb072928ee1ae5f3ab52
Related: odoo/enterprise#41310
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-23 08:42:15 +02:00
Brieuc-brd ee75969979 [IMP] *: app icons: replace svg to png
The introduction of Milk has brought new app icons.
Using the svg format creates a lack of anti-aliasing on the edges of the
shapes, which makes the icons look bad.
Since the png size has been reduced, we can afford to use the png format
to have the best possible quality without having a lack of performance.

task-3326633
Part of task-3326263

X-original-commit: e07cb722f2b11407a3ad093bd688b7d37afd5a88
Part-of: odoo/odoo#121886
2023-05-22 13:54:07 +02:00
Elisabeth Dickinson 45b9e04db4 [IMP] *: status buttons fix
Part-of: odoo/odoo#116641
2023-05-12 22:59:23 +02:00
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Elisabeth Dickinson b2ef35a431 [IMP] *: replace .bg-color by .text-bg-color on ribbons
Also remove unnecessary CSS on ribbons.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
Antoine (anso) fabf9e9703 [FIX] hr_{recruitment,skills},mass_mailing,project,note: milk adaptations
hr_recruitment: switch smart button value and label
- Switching applicant's name with "Employee" label to be consistent with
  the rest of smart button's format

mass_mailing: adapt status bar layout
- Removed excessive margin between the status bar and the content
- Added no padding between status bar and the control panel
- Removed a useless border before the status
- Improved margin between alert and buttons

project: right side panel stats buttons alignment

hr_skills: fix `::before` alignment

== ISSUE ==

Before this commit, the :before line in Employee resume is not aligned
with the dots. This is due to the fact that the variable
$o-hrs-timeline-entry-padding used in the mixin isn't the right value we
should use.

There was also an issue with responsive.

== After this commit ==

We now use a calc, which process the half of the circle plus the padding
minus the border-width. The $o-horizontal-padding is the variable used
to define the padding of the line inside the form view.

We adapt this in a smaller media query since the $o-horizontal-padding
value is different.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
stefanorigano (SRI) 46b762a1f1 [REF] web, *: milk colors
*: google_calendar, hr_holidays, hr_skills_slides, mail,
microsoft_calendar, point_of_sale, web_editor, website_livechat,
website_sale

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +02:00
qsm-odoo b3b8dbb858 [FIX] mass_mailing: restore website snippets demo page
When mass_mailing was installed, the website snippets demo page did not
work anymore. This is due to a combination of two factors:

A. [1] marked views for removal just before the release of the 16.0 (so
   that they could be removed via an upgrade script later on after
   runbot things) but we forgot to remove them before the release.

B. The views that [1] tweaked and should have been removed contain an
   apparently simple `<div>` with a comment... but it actually acts as
   an xpath looking for a div as it is an extension view. Unfortunately,
   there is a bug in the t-call/inheritance system regarding this: when
   the main view containing this xpath is rendered directly, there is no
   issue (that's what edit mode works: a div is found and nothing is
   added inside). But when it is t-call'ed (as it is the case in the
   snippets demo page), the div cannot be found anymore (it seems to
   look for `/data/div` instead of `/t/div`).

The bug described at B (if it is really a bug) could be worth checking
but this is probably not worth the time until a real usecase occurs. For
now, this commit fixes the broken demo page by removing those useless
xpathing views.

[1]: https://github.com/odoo/odoo/commit/3201eba9fd31602d709b962965e9c1411d1eeb6f#diff-b26221e9411fb6f3725ce5a30c4659a22d81a9a69f666bdbd6daa77e03ec3253R302-R308

task-3233465

closes odoo/odoo#121202

X-original-commit: 10497b96c067c234553bf44d735e51414087bca9
Related: odoo/upgrade#4668
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-05-11 19:21:09 +02:00
Guillaume (gdi) 3952fbd15f [IMP] mass_mailing, *: add TikTok to templates
*: mass_mailing_themes, website_mass_mailing

This commit adds TikTok to the already existing social networks in all
email marketing templates (droppable blocks and default mail templates).

task-3235451

closes odoo/odoo#116837

Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2023-05-11 09:36:21 +02:00
Benoit Socias 95bb8dc0f8 [FIX] web_editor, website, *: make snippets name translatable
*: mass_mailing, website_blog, website_event, website_mail_group,
   website_mass_mailing, website_payment, website_sale, website_twitter

The names of snippet blocks are not translatable because their name is
obtained from a their template name which is not a translatable item.
For markets that use a non-latin alphabet this is a no go.

This commit makes it possible to specify a `string` attribute in the
`t-snippet` blocks that makes their name inventoried by the translation
process.

closes odoo/odoo#118530

X-original-commit: a501d226d8674ed0c9b183c69a9e754c79682237
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-04-17 08:24:47 +02:00
Mathieu (mano) 934069f834 [IMP] web_editor, mass_mailing: add and sort shapes
This commit is the first step towards the addition of various SVG shapes
for the website app.

The purpose of this commit is to add the new shapes SVGs and to sort the
current shape menu into new categories.

The avoid duplicating the shapes added in mass_mailing, the 3 shapes:
   - Circle
   - Slanted
   - Triangle (corner)

Are now in the web_editor, their existing reference in mass_mailing
template have have been changed to their new locations. To adapt to
`b1a3a3b18370ad76280726298602815769dce1c2` the paths have been changed
and a new record for `s_tech_default_image.jpg` have been created in
the new file `mass_mailing_themes/data/ir_attachment_data.xml` since 
it's an image only used in themes. (Also removing  `noupdate=0` from
the data element in `mass_mailing/data/ir_attachment_data.xml` 
since it is the default value).

I also removed the .png and old .jpg of this image since now the shape 
is applied directly on the image. 

Since the shapes + their image are converted in a base64 img+svg on
save, we can move the assets of the current website shapes in use 
without compatibility issue. Therefore these shapes were renamed and 
moved their new folder category.

The SVG width and height of the new and previous shapes was set to
600x600 since they are mostly squarish and are going to be rendered in a
square preview in the future.

To simulate the future preview of the shape selection menu, the
`we-button img` width was set to
`$o-we-sidebar-content-field-dropdown-grid-item-height` and the
`we-button` width to `1/4` in the file `wysiwyg_snippets.scss`.

It makes the preview 60x60 and displayed in a four tiles layout.

Note : 

- If later on the SVG are rendered as inline-svg rather than base64
the current IDs inside the .svg might conflict if multiple svg are
on the same page.

- The previous shapes might look a bit weird with the squarish ratio
in preview, alternatives solutions should be explored during the 
implementation of the new UI. 

task-3094258

closes odoo/odoo#110673

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-17 23:24:06 +01:00
Louis Wicket (wil) 9afe7c74c9 [IMP] *: remove "French spacing" 👺
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#114533

Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-14 15:52:10 +01:00
Soukéina Bojabza 1dab4ffe28 [FIX] mass_mailing: fix wrong templates with shape images
Since [1], some mass_mailing snippet templates now have images with
shapes by default. However, the shapes were not added correctly:

- for the Blockquote snippet, the files specified are not correct (wrong
names and wrong extensions).
- for the Team snippet, the shapes are not present when dropping it.

This commit fixes that by properly adding the shape images as defined in
the commit [2]. It also removes the "circle images" files as they are
not necessary anymore. The basic shapes were also fixed by removing
their width and height, since the dropped snippets looked weird because
their images have a default width smaller than the shapes.

[1]: https://github.com/odoo/odoo/commit/f4995f560003c2180ad3cef50e1b172a151e50c8
[2]: https://github.com/odoo/odoo/commit/eb1262960f54fd81424a86ef4d6693a950e76cb4

opw-3137732

closes odoo/odoo#114966

X-original-commit: b1a3a3b18370ad76280726298602815769dce1c2
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-10 16:48:15 +01:00
Victor Feyens 24ccf7d9b0 [CLN] *: useless type info for actions
The type fields of actions already defaults to
the model name in the base model definition.

Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).

closes odoo/odoo#114539

Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-08 17:33:37 +01:00
Renaud Thiry beb02b5c8e [FIX] mass_mailing: hide menu on mobile
closes odoo/odoo#114543

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-08 16:26:16 +01:00
std-odoo 97ca45e4f3 [IMP] mail, mass_mailing: store the bounce email and allow the user to read it
Purpose
=======
The bounce emails aren't stored in Odoo, which can complicate the
debugging of the email sending.

Now, we store this bounce email, and we allow the user to read it from
the interface, so he can easily find the issue when an email sending
fail.

Specifications
==============
The bounce email is stored on the mail notification for standard emails
sending, and on the mailing traces when using mass mailing.

For some email providers (e.g. Yahoo), the "Final-Recipient" header is
not present. Normally, it allows us to retrieve the original recipient
of the email which bounced and then the partner. So if this header is
not there in a bounce email, we take the first recipient of the parent
<mail.message>.

Change the way that we parse the email body, for the bounce email.
For most email providers, the first mail body is the one that contains
the error and the next one contains the parent email body. So, the
current logic might ignore this body for Outlook and Yahoo.

Task-2116296

closes odoo/odoo#105923

Related: odoo/enterprise#34051
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-03-06 17:47:29 +01:00
Sébastien Geelen (sge) eae20c47eb [REF] web,web_editor,mail : dynamicplaceholder hook
Refactor the Dynamic Placeholder hook to have better
separation of concern from the Field that need it.

task-3081325

Part-of: odoo/odoo#109326
2023-02-24 16:09:45 +01:00
Nicolas Bayet 172a40709c [FIX] web_editor,mass_mailing: prevent sidebar glitch
Before this commit, the sidebar visibility was toggled with a css
transition, each time a change was made in the html_field.
Additionally, the transition was not working properly when opening
a mailing. Because this transition was made for website and this code
is no longer being used in website and is not usefull for mass mailing
we can remove it.

task-3100202

X-original-commit: 21056444562e530fb811095b4805345709295ca3
Part-of: odoo/odoo#112908
2023-02-16 17:57:19 +01:00
Nasreddin Boulif (bon) f03dd28c17 [FIX] mass_mailing: display Unsubscribe link in mail preview
Steps to reproduce:

  - Install `mass_mailing` module
  - Go to mass_mailing and create a new mailing
  - Add a `from scratch` snippet
  - Add a `footer center` block
  - Save and click on `Mail Debug` tab

Issue:

  The `Unsubscribe` link is not displayed in the preview.

Cause:

  When converting the Bootstrap rows to table, we convert only the row's
  childrens that have a `col` class:
  https://github.com/odoo/odoo/blob/4ba61316a4dd212d6a572e3f9fcc250815b912f0/addons/web_editor/static/src/js/backend/convert_inline.js#L12
  https://github.com/odoo/odoo/blob/4ba61316a4dd212d6a572e3f9fcc250815b912f0/addons/web_editor/static/src/js/backend/convert_inline.js#L186

Solution:

  Add a `col-lg` CSS class on the first children of the row.

opw-3104011

closes odoo/odoo#112697

X-original-commit: 0a3d7ffb5132d7a68fbd75669903bcb0af25b584
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-02-15 11:26:44 +01:00
amdi-odoo 0bb95cb8d6 [IMP] mass_mailing: improve modal wording
Improve the wording of the sending confirmation
dialog and the sending test dialog for emails

Task-3098731

closes odoo/odoo#108410

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-02-03 16:32:09 +01:00
Adrien Schoffeniels 9e071ac34c [FIX] utm, *: allow quick creation of campaigns
Purpose:
========
Since the introduction of the required "title" field in the utm_campaign
model in commit [1], quick creation of campaigns from many2ones is not
possible anymore (the slow creation modal is opened when clicking on
"Create"), and the name value entered is not copied into the name field
of the creation form.

This is because the model now has a field "name", and a field "title",
which are both required. The creation using the many2one widget tries to
create a record using the entered value as title and no name, which fails.

It fails because the create method replaces this empty name by a False
value, since it could not generate a unique name given no name.

This commit makes sure that if a title but no name is given when creating
a new campaign record, one does not set the name value to False anymore.

It also makes sure that the value entered before clicking on the "create
and edit" button is copied in the form, by adding the "create_name_field"
option on the many2one fields (the form uses the title field, not the
name).
The "always_reload" option has also been added because without it, the
many2one shows the name of the created record instead of showing the title.

[1]: https://github.com/odoo/odoo/commit/4dbcefb5e5b1878e81fe9be9fe48a785f813334f

Task-3113954

closes odoo/odoo#110474

X-original-commit: 869208cd09b6ceb5dcda55b6fe4131d7cc8d43e8
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-20 06:21:02 +01:00
Romeo Fragomeli 51db7cd7b6 [FIX] *: some border aren't apply anymore
* = digest, hw_posbox_homepage, im_livechat, mass_mailing, web_editor,
website, website_slides_forum

Since the migration of Bootstrap 5 [1], some CSS rules was automatically
converted (`border-left` and `border-right`) when it shouldn't be.
These conversions were made because the CSS rules was embedded in
HTML/XML code and the REGEX for the conversion had no protection for
these cases.

This commit restores the old correct value.

Ref:
[1] odoo/odoo@1fcd098af5

closes odoo/odoo#110141

X-original-commit: 0cbf7c00ecc307fc725da345415647828e771bb4
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-01-17 18:12:48 +01:00
FrancoisGe a61cd4b322 [FIX] mass_mailing: action_import add default_mailing_list_ids
The goal of this commit is to fix the problem introduced by the PR 106519.

How to reproduce the problem:
- Go to the "Email Marketing" app
- Go to the "Mailing Lists" menu
- Click on a "Mailing List"
- Click on the "Recipients" stat button
- Click on the "Import" button

Before this commit:
A dialog opens and no mailing list is selected.

After this commit:
A dialog opens and the mailing list we are in is selected.

closes odoo/odoo#106732

Related: odoo/enterprise#34453
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-16 10:32:06 +01:00
FrancoisGe f36c404927 [IMP] *: converting custom kanban views adding a doAction button
In this commit, we will convert all the customisations of the kanban view
consist in adding an always present button in the control panel that
performs an action/calls a model's method.

To do this, we will use the new display="always" parameter applicable
to buttons in the header of kanban views. This allows us to define a
button that is always visible in a kanban view.

Taskid: 3082390
Part-of: odoo/odoo#106732
2023-01-16 10:32:06 +01:00
Jorge Pinna Puissant 5b68871097 [IMP] * : kanban, unify dropdown definition in archs
This commit separate the templates, one for the card and another one for
the menu (the ellipsis dropdown).

The new template, called 'kanban-menu', will only contain the dropdown.
Note that, this behaviour is the same as the one used for the kanban
tooltips.

closes odoo/odoo#107589

Task-id: 3096776
Related: odoo/documentation#3284
Related: odoo/enterprise#34962
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-05 15:37:04 +01:00
Antoine Guenet 9521a4b5d6 [FIX] mass_mailing: remove link background color option
Commit [1] introduced a "custom" type of button as the only type of
button whose background color we are allowed to change. But the option
to change any button's background color exists in mass_mailing so we end
up with the same option in two different places. This removes that
previously existing default option.

[1]: https://github.com/odoo/odoo/commit/a010c91b5ee119cf54ed1a68a6ea06b2bc5f3978

task-3096806

closes odoo/odoo#108269

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-20 11:29:21 +01:00
Antoine Guenet c62d248e32 [REM] mass_mailing: remove the mass_mailing_sizing_x snippet option
mass_mailing had a special snippet option just for resizing images
horizontally. Since this exists in the website builder as well, there is
no need for a separate snippet with a different behavior for
mass_mailing.

task-2615373

closes odoo/odoo#84061

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-19 17:53:54 +01:00
FrancoisGe 1f0e840238 [IMP] *: converting custom list views adding a doAction button
In this commit, we will convert all the customisations of the list view
consist in adding an always present button in the control panel that
performs an action/calls a model's method.

To do this, we will use the new display="always" parameter applicable
to buttons in the header of list views. This allows us to define a
button that is always visible in a list view.

closes odoo/odoo#106519

Taskid: 3082303
Related: odoo/enterprise#34387
Related: odoo/documentation#3044
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-12-16 18:39:56 +01:00
Adrien Dieudonné 3d6599ac1f [FIX] mail, mass_mailing: chatter should take all width
In some case, we want that chatter takes the all space
available.

Steps to reproduce:
- Go to Email Marketing
- Click on any record
- Go to the Chat tab

closes odoo/odoo#107928

X-original-commit: cbbbc23800e2a00aab9af45087b5d3f7698823d8
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-12-14 15:36:45 +01:00
Jorge Pinna PuissantandMichael Mattiello (mcm) c7c2959449 [IMP] web, *: simplification and standardization of the settings arch
The aim of this commit is to simplify and standardize the settings archs.

To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.

The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.

```xml
    <app string="CRM" name="crm">
    ...
    </app>
```

- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
        logo is created using the `name` parameter :
        `/{name}/static/description/icon.png`.

The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.

```xml
    <block title="Title of group Bar">
    ...
    </block>
```

- `title` *optional* : The title of the block of settings (the old h2),
        you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
        (the old h3), you can perform research on its text.

The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.

```xml
    <setting string="this is bar">
        <field name="bar"/>
        ...More elements
    </setting>
```

- `type` *optional* : By default, a setting is visually separated on two
        panels (left and right), and is used to edit a given field. By
        defining `type='header'`, a special kind of setting is rendered
        instead. This setting is used to modify the scope of the other
        settings. For example, on the website application, this setting
        is used to indicate to which website the other settings apply.
        The header setting is visually represented as a yellow banner on
        the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
        not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
        displayed just below the setting label (with classname
        `text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
        icon is displayed next to the setting label to explicit that
        this setting is company-specific.
- `documentation` *optional* :  If this attribute is set, an icon is
        added next to the setting label, this icon is a link to the
        documentation. Note that you can use relative or absolute path.
        The relative path is relative to
        `https://www.odoo.com/documentation/server_version`, so it's not
        necessary to hard-code the server version on the arch anymore.

closes odoo/odoo#106425

Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
2022-12-02 14:40:25 +01:00
Thibault Delavallée efe53fbe88 [IMP] mass_mailing: improve routes naming
Rename main routes, and keep a legacy for the main unsubscribe route to
keep retro compatibility for existing mailings.

Task-2710804 (Mail: Clean MailThread API)
Task-2669037 (Mass Mailing: Subscription page code cleaning)
Prepares Task-2150462 (Mass Mailing: Unsubscribe flow refactoring)

Part-of: odoo/odoo#106568
2022-11-25 18:55:21 +01:00
Thibault Delavallée b4559e55d2 [REF] mass_mailing: rename templates and controller methods
PURPOSE

Overall cleaning of subscription and exclusion list management code from portal.

SPECIFICATIONS

Rename templates to better understand their purpose. Current naming is not
crystal clear.

Rename controller methods in order to be clearer and more aligned with current
guidelines. Notably namespace by mailing, try to be clearer about their
purpose, ...

No change should occur with this commit.

Task-2710804 (Mail: Clean MailThread API)
Task-2669037 (Mass Mailing: Subscription page code cleaning)
Prepares Task-2150462 (Mass Mailing: Unsubscribe flow refactoring)

Part-of: odoo/odoo#106568
2022-11-25 18:55:21 +01:00
Thibault Delavallée 225b487a3c [IMP] mass_mailing: add helper field when targeting mailing lists
Currently there are several checks on mailed model directly in code due to
mailing list specific behavior. In order to be easier to manipulate and
a bit less low leve, a computed field is introduced for that purpose.

Indeed there are some behavior changes when the mailing runs on mailing lists
instead of directly on records. There are notably some changes in display
(choose mailing lists but mail contact is the real contact model), and in
subscription page (directly unsubscribe from mailing lists).

Task-2710804 (Mail: Clean MailThread API)
Prepares Task-2150462 (Mass Mailing: Unsubscribe flow refactoring)

Part-of: odoo/odoo#106568
2022-11-25 18:55:20 +01:00
Thibault Delavallée f72621a445 [FIX] mass_mailing: use frontend assets in subscription page
PURPOSE

Overall cleaning of subscription and exclusion management code from portal.

SPECIFICATIONS

Unsubscribe page uses a custom layout allowing a portal-like behavior for
mass mailing without any link to website or portal. However it currently
uses the complete backend assets. This leads to a lot of unnecessary css
and js being loaded.

When having frontend pages like the one used in mass mailing it should rely
on frontend assets with some custom assets if necessary for the page to
be correctly displayed.

In this commit we choose to use frontend assets like other portal-like pages.
Mailing layout now uses the frontend layout defined in web and adds its own
subset of assets (mailing_assets). Some custom css is moved or added as well
as few tweaks to ensure layouting is globally the same as before this commit.

Task-3082546 (Mass Mailing: Fix assets and unsubscribe page)
Task-2669037 (Mass Mailing: Subscription page code cleaning)
Prepares Task-2150462 (Mass Mailing: Unsubscribe flow refactoring)

Part-of: odoo/odoo#106568
2022-11-25 18:55:19 +01:00
Mahamadasif Ansari dfdec50617 [FIX] mass_mailing: fix missing logo in welcome message template
Currently in mass_mailing when the user selects the welcome message
template in the mailing body, the logo is missing.

This is because the name of the logo image does not match the format, so
it converts the extension of the source image from png to jpg.

With a recent refactoring (see commit[1]), it renames the "s_default_image_logo"
with "s_default_image_header_logo", so when loading the template, the format of
the file name does not match with "s_default_image_logo" so it converts the
extension of the source of the image in the template from png to jpg, and
as a result, the image is not found.

This commit resolves the above issue by adding the "header_logo" context,
which prevents it from converting "s_default_image_logo" png to jpg. 

commit[1] -https://github.com/odoo/odoo/commit/a559fe4
task-3054248

X-original-commit: b41e8685f9b0462154f859441eebfd3a660c616c
Part-of: odoo/odoo#105817
2022-11-16 07:32:39 +01:00
Patrick Hoste 2504a0bd2b [FIX] mass_mailing: change favourite filter helper icon
This commit changes the favourtie filter helper icon to
match the one in the mailing.mailing view.

Task-3048050

closes odoo/odoo#104756

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-14 14:20:36 +01:00
qsm-odoo c6561929f3 [REF] web_editor, *: review data-js + data-option-name duplicate
*: mass_mailing, website

Commit [1] introduced data-option-name allowing to name snippet options
without data-js so that their automatic snippet-option-XXX class was
not snippet-option-undefined. This was indeed useful to target specific
options in tours.

The attribute is however a complete duplicate of data-js (if you use
one or the other, it does exactly the same thing). Indeed, you can
define a data-js without a linked JS class (as it is already done). And
if you define both expecting the class using data-option-name but the JS
used from data-js that won't be the case, data-option-name is simply
ignored.

This removes data-option-name. This prepares refactorings that will be
done in the future:

- The way to define option in XML will be reviewed (probably client
  side definitions, probably OWL templates).

- Adding data-js will probably require a JS class to exist, but all
  option definitions of Odoo will declare one to ease extensions and
  stable fixes.

Those are theoretical at this point though. This commit main focus is
simplifying the code.

[1]: https://github.com/odoo/odoo/commit/7b0a147cd43e8e890ebe5a882292a69a5c8c90ac

closes odoo/odoo#103988

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-26 12:23:09 +02:00
Romain Estievenart 06948a763e [IMP] *: adapt bundle to support dark mode switch
This commit adapt all bundle to support dark mode

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:54 +02:00