This commit removes the legacy implementation of the form, kanban
and list views. It also removes the legacy view widget registry,
and all legacy widgets it contained. The legacy field registry
couldn't be removed yet as some fields are still used (e.g. in
client actions: FieldMany2One, FieldMany2ManyTags...), and
sometimes accessed from that registry (e.g. uom service). More
clean up will come later. Note that all tests using legacy views
have thus been removed, even though the tested feature might still
remain (e.g. FieldMany2One tests have been removed, but that field
is still there). However, those features are deprecated and
unlikely to evolve. They should be removed in the next saas, or the
one after.
Finally, this commit also removes the legacy view dialogs.
Task 3168640
Part-of: odoo/odoo#111809
The UI elements related to table creation and edition are no longer
present in the toolbar, as the Wysiwyg and SnippetEditor instances
remove the `#table` div section from toolbar.
Furthermore, the OdooEditor instantiates a TablePicker instance to be
appended to the tablepicker dropdown menu under the (inexistant) #table div
in the toolbar.
This commit removes dead code related to table creation/edition via the
toolbar.
task-3074598
Part-of: odoo/odoo#111131
When we change something in the DESIGN tab of mass_mailing, we edit a
stylesheet. This means we need to flush the rules cache so
convert_inline applies the new rules in its conversion.
opw-3114599
closesodoo/odoo#111778
X-original-commit: 4ebf106e65ae4901c03c76606a05d8cd2e0790d7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This is a step closer to a goal of avoiding dependence on asynchronous
modules. Starting from this commit, new tour definition should be
registered to `registry.category("web_tour.tours")` registry.
So, instead of the following:
```js
import tour from "web_tour.tour";
tour.register(name, options, steps);
```
We now do:
```js
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add(name, optionsWithSteps);
```
Notice the `options` and `steps` params are merged when registering
the tour definition. It should look something like so:
```js
registry.category("web_tour.tours").add("account_tour", {
test: true,
steps: [ ... ],
});
```
And if the `TourManager` instance is needed, one can get it from the
registry like so `registry.get("tourManager")`. Note however that
this instance is only available when the `TourManager` has been
instantiated -- so it's not available at top level of the module.
closesodoo/odoo#111103
Related: odoo/enterprise#36335
Signed-off-by: Géry Debongnie <ged@odoo.com>
The lack of a default `options` parameter for `toggleLinkTools` led to a trace
when this method was called without parameters.
This method was introduced by [1].
This commit fixes it by adding an empty object as default parameter.
[1]: https://github.com/odoo/odoo/pull/106796/commits/862d93f9eef16ec45b0d27b246fae560f7feaf1e
task-3149496
opw-3149496
opw-3151829
closesodoo/odoo#111222
X-original-commit: 24293e2a3217d0b851a3ab1c083f2984efb31d60
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Before this commit:
Text style and text size drop-up were not fully visible due to overflow.
After this commit:
Added a scroll property to give accessibility to the items.
Task- 3100123
closesodoo/odoo#110547
X-original-commit: dbe410fdc93b1eb89d70c9b2a51e81b0075147d4
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The basic "Plain Text" template does not have the sidebar and
therefore cannot use the link tools that are in it and must use
the link dialog instead.
Task-3128388
Task-2889670
closesodoo/odoo#110089
X-original-commit: 399e5919c18145371791092868839a5ef11209a2
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Since [1], the /link and /button commands did not open in the dialog
anymore and used the sidebar instead. This was wrong for the "Plain
Text" template which does not use the sidebar, and was otherwise
confusing as the main effect of the command would be to focus in the
sidebar.
Task-3128388
Task-2889670
[1] https://github.com/odoo/odoo/commit/61f7366d686b353ae9614285370e952253ec067c
X-original-commit: 44c9be11f1bc5451adc76a69862e7e513c2d9bba
Part-of: odoo/odoo#110089
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
*: mass_mailing
When images are dropped from outside the browser into a website page
text paragraph, they are stored as an inline base64-encoded source.
This commit marks those images to be saved as attachments when it
happens in website. The save happens upon page save similarly to what is
done when images are transformed.
This commit also applies this behavior for pasted images.
task-2928495
closesodoo/odoo#98801
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
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
closesodoo/odoo#84061
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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.
closesodoo/odoo#106519
Taskid: 3082303
Related: odoo/enterprise#34387
Related: odoo/documentation#3044
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit:
Use the top right arrow to navigate from a record that is in the draft stage
to the record that is in stage sent and use the arrow to come back to a record
that is in the stage draft. The theme selector is added to the sidebar.
After this commit:
Now theme selector will not be added to the sidebar.
Task-3016118
closesodoo/odoo#108026
X-original-commit: 44e388bbb2749b342985b11b71d50535bb5a5c1c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The view height of the mail template was too small (30px) when accessing the
mailing view form from the mail campaign menu. This solves the problem.
Note: To get better view and similar to previous version (15.3), font size has
been adjusted.
Technical note: this has been solved by adding a min-height in the css
definition of the class (o_field_mass_mailing_html) used to display the iframe.
This is the same value as the one already used when the template is not yet
chosen.
Task-3067603
closesodoo/odoo#107331
X-original-commit: 38ad5bf080a6948c30b34be57beb073eb377dfd9
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Current behavior before fix:
In mobile view when we click invite button on events module which loads the
snippet, at that time there was a traceback.
Desired behavior after fix:
Now the snippet gets loaded without any traceback.
Task-2994261
closesodoo/odoo#106734
X-original-commit: 634f6ae4d4208f0551bc2b81c359915eb47316b5
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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
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
The preview of a mailing was displayed twice:
- after a save and when clicking on the preview button
- when double-clicking on the preview button
This solves those problems.
Technical notes: quick explanation of the fixes:
- double display after a save: the click event was registered twice (same for
the code preview button), the fix unregister the click before registering it
again.
- double display when double-clicking quickly on the button: the modal is not
displayed immediately and the button remains active a brief moment allowing a
second click. The fix disables the button when the button is clicked and
reenables it when the modal is closed.
Task-3047479
closesodoo/odoo#105974
X-original-commit: 0403938c3e0103d97ae828afdae06fcda06bd406
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose:
--------
In the full-width form view of mailing, the alert-info message was not
displayed correctly: it did not fill the whole empty space in the header
This message is now always filling the gap between the buttons and the
status widget of the header.
Task-3010933
closesodoo/odoo#104868
X-original-commit: f216b7e6cf607e18fd54655aca1a0df5a951ce76
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Commit a170b7265e158323d3769f1631314f06c96a6e4b
applies the star color to all stars in the form view
The star in the stats bar should remain black.
task-3044832
closesodoo/odoo#104210
X-original-commit: b2f37a06546638fde69d392dfec3d76fc15ca0e3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
There was too much padding up and down from the tooltip.
Adds conditional display on the template menu
when there are no templates (t-for-each is not fully empty).
Also fixes the favorite icon color in edit mode.
task #2984478closesodoo/odoo#104108
X-original-commit: a170b7265e158323d3769f1631314f06c96a6e4b
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
The purpose of this commit is to fix an indeterminate error in
the test_03_sale_quote_tour.
Error: UncaughtTypeError: Cannot read properties of undefined (reading
'unselectable')
Why:
In the autocomplete component, it is possible to replace the sources
without it being rerender. It is therefore possible to click on a option
that no longer exists in the component's internal state, which causes
the crash.
Solution:
We wait that all the sources are loaded before replacing them.
closesodoo/odoo#103497
X-original-commit: f25df0be75082caf9e8ed62c581a13fe82a27546
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
Before this commit
The theme "Start From Scratch" could not be selected as the theme
picker was reloaded when clicking on that template.
closesodoo/odoo#103034
X-original-commit: 1a1d1c0f229aa0d29cf22806ffb1be04ab9cfa1c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit
1) click on a record in a list view
2) change the html field of a record
3) click on the top right arrow to change the next record
4) click on the top right arrow to change the previous record
5) click on the top right arrow to change the previous record
The value is not updated corretly at step 4, retaining the value from the
previous record. The wrong value is then saved at step 5.
After this commit
Properly reset the HtmlField property `currentEditingValue` when
the update of props value does not comes from the editor.
X-original-commit: 39d02c3cdc2d4256b62cd6414369a8cf82efff48
Part-of: odoo/odoo#103034
The editor's toolbar is at the very bottom of mass_mailing's sidebar,
making dropdowns pretty awkward as they often require the user to scroll
down to see them. This extends the editor's toolbar for mass_mailing so
all dropdowns become dropups instead.
closesodoo/odoo#102734
X-original-commit: d4b5527113a6092063cba3409d870c5c45a8cd03
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The iframe in mass_mailing is self-resizing in order to avoid having two
vertical scrollbar side by side. This failed since the conversion to OWL
due to the vertical offset added when resizing having become
insufficient. This adds a class to the <html> element of the iframe to
identify when it's in the context of mass_mailing so we can remove the
overflow visible style that is not needed in this context. This allows
us to remove that vertical offset altogether since the scrollbar
disappeared.
X-original-commit: 4f538911d68afdeca0253f15c9e8ffdbed4e995c
Part-of: odoo/odoo#102734
One of `mass_mailing_tour`'s tooltips was overflowing the body and
causing a horizontal scrollbar. This repositions it so that doesn't
happen.
X-original-commit: 4e2ccb51991cbe4428f084f333c57b78851f73b0
Part-of: odoo/odoo#102734
Before this commit
When clicking on "create" from a form view in mass_mailing, the
"template picker" was not presented.
task-3002100
closesodoo/odoo#102725
X-original-commit: 664d5982663517e8e2f2f87b355fd7d3c72285f1
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Allow the mail templates to activate the dynamic placeholder
like in mass_mailing.
task-2978722
closesodoo/odoo#102603
X-original-commit: f98c472a6d3cd79c28b7b91bdc8359c45c4d3c7a
Related: odoo/enterprise#32484
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Add missing feature of the ModelFieldSelector popover :
* keyboard navigation
* additional debug value
* add default value page ( for dynamic placeholder)
* add validate callback
Migrate dynamic placeholder to be compatible with new OWL field.
task-2978722
X-original-commit: 929108e29168058fad5da85e0ff9c66d2c5b2525
Part-of: odoo/odoo#102603
*: web_editor, website
Prior to this commit, the template structure for declaring the snippet
options used in a specific context (website, mass_mailing, ...) made it
hard to easily modify SnippetOptions defined in web_editor.
Indeed, the structure was as below
```xml
<template>
<t t-call="web_editor.snippet_options" />
... Additional Options ...
</template>
```
If someone wanted to alter the behaviour of an option from web_editor
for their module, they had 2 solutions
- To extract that option inside another template, extend that template
inside their own module, remove its call from web_editor and instead
call manually the option inside each module (preferred method)
- To impact the web_editor template directly with an extension instead
of a new primary template or override JS options using include or
replacing an option inside the registry.
The second solution was often used but created extra code to make sure
that other modules were not impacted... and it was often not properly
done. For example:
- [1] and [2] introduced javascript code inside the web_editor options
and isolating it by checking if they are in fact, inside mass_mailing.
- [3] adds code in mass_mailing mentioning JS classes of website, and
actually broke parallax for website (after [5]).
- [4] broke the image transform option for website (after [5]).
- [6] added some shapes for mass mailing images but ended up adding them
for the website builder too.
- [7] created different images options for mass_mailing... but ended up
impacting website options too. Half of those can actually either be
put in web_editor to improve everything or just in mass_mailing to not
break the website.
- ...
This commit tries to fix everything "the right way" in master (and will
be backported for the recent 16.0). Other stable fixes will need to be
made to restore the website options in a stable way.
To fix that, this commit changes the structure to
```xml
<template inherit_id="web_editor.snippet_options" primary="True">
<xpath ...>
... Change existing options ...
</xpath>
<xpath expr="." position="inside">
... Additional options ...
</xpath>
</template>
```
This allows each module to modify the existing web_editor templates
without impacting it and each other. They can even change the JS
behaviour by using an XPath to replace the data-js of an option, and
changing it to their own extended version of the JS option.
[1]: https://github.com/odoo/odoo/commit/f296992317e96562c66bd7ad59a5080d6c551ed5#diff-df5e4ff426027c53ebe6e25c25820fb92237c17a036f6202a93e5ca681ec8c16R134-R138
[2]: https://github.com/odoo/odoo/commit/cd403480f90cf7103651f3be818a14b06d3c73ca#diff-df5e4ff426027c53ebe6e25c25820fb92237c17a036f6202a93e5ca681ec8c16R175
[3]: https://github.com/odoo/odoo/commit/e9237ae8004502a3071e8ceb132d9dac11fe00b3#diff-df5e4ff426027c53ebe6e25c25820fb92237c17a036f6202a93e5ca681ec8c16R372
[4]: https://github.com/odoo/odoo/commit/ff422df49201be6ed7baa11ef3deb5b9a41042a7
[5]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
[6]: https://github.com/odoo/odoo/commit/24a4c7f897d4db6bdf0f3cbfc91a3ce7351241a2
[7]: https://github.com/odoo/odoo/commit/d0c2d8e9a1436a8eaf263797c790329f81d7615bclosesodoo/odoo#99850
Related: odoo/design-themes#597
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
PURPOSE
With this commit you can now see how the mailing you're creating
will look like on a mobile.
LINKS
Task-2818037
closesodoo/odoo#101822
X-original-commit: 2b195390e15c9ed3b54f0adf0afc439f06429616
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit does multiple things:
- The readonly mode of form view is removed but not for the fields.
it means that the fields in the view are always in edit mode except
if we force them to be readonly.
- The control panel is revamped to take less vertical space and shows now
the record editing (dirtiness)/validity status after editing the record.
- The record is saved only when leaving the view or by clicking the save
button when hovering the record status in the control panel.
- The record can still be discarded by clicking the discard button when
hovering the status text in control panel.
task id: 2822553
X-original-commit: 77824ad44b6945a9811120380747f87ef6362ae2
Part-of: odoo/odoo#101118
Co-authored-by: luvi <luvi@odoo.com>
Before this commit
In a nondeterministic sequence, the editor was not totally loaded
whenever the test `mass_mailing_editor_tour` dropped a snippet
in the page.
Now, by waiting for the attribute `data-editor-message` to be set,
we ensure that the state of the editor is ready for dropping a snippet
in the page.
closesodoo/odoo#100752
X-original-commit: a333c8ff6b48c7f614ee0a45321fdf176e9dc33b
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Steps to reproduce the issue:
- Open an Automation Campaign
- Open a mailing
- Click edit
- Traceback: this.options.onIframeUpdated is not a function
closesodoo/odoo#100603
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit
When creating a new mass_mailing and hitting multiples times enter, the
content was reset.
task-2985162
closesodoo/odoo#100284
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
In switchThemes and commitChanges, the editor was reset by directly
setting the html in the editable. This caused a mutation to potentially
set a truthy value for `odooEditor._toRollback`. As we reset the editor
content, we now use `odooEditor.resetContent` to ensure
`odooEditor._toRollback` be falsy.
task-2980550
Part-of: odoo/odoo#100009
- adapt the html field and mass_mailing_widget to be owl components
- adapt the mass mailing view to be an owl view
task-2898432
closesodoo/odoo#94875
Related: odoo/enterprise#30915
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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>