Commit Graph
3238 Commits
Author SHA1 Message Date
stefanorigano (SRI) 9207b7aeea [FIX] web_editor: typography adaptations
Prior of this commit the paragraph margin-bottom was forced to '0'
braking the typography's vertical rhythm.

This commit will remove the customisation rules restoring bootstrap
default values for the backend.

task-2798759

closes odoo/odoo#86740

Signed-off-by: Antoine Guenet <age@odoo.com>
2022-03-29 20:20:39 +02:00
Thibault Libioulle 55a6f2e996 [FIX] web_editor: catch errors during save and allow to fix it
Prior to this commit, when an exception occured during the save of an
ir.ui.view, the traceback was shown to the user and an alert directly
asks the user to reload or cancel the page.

While reloading, the changes that produced the traceback were not saved
and the other modifications were saved.
If the user choose to cancel the reload, the web editor UI was freezed
and there couldn't be any edition anymore.

This commit adds correctly the popover to target the invalid element and
shows the error rather than reloading the page.
The element which caused the error can still be edited. The other are no
more editable.

task-2700198

closes odoo/odoo#87350

X-original-commit: 10b97f37ab5d78b3a2b0f63fa019ee95bb78ea7d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Thibault Libioulle (tle) <tle@odoo.com>
2022-03-29 18:21:51 +02:00
Gorash ca4fe12a37 [IMP] base: rename var option into compile_context
In order to make it easier to understand the code of qweb.

Part-of: odoo/odoo#85110
2022-03-29 10:56:16 +02:00
Martin Trigaux f41ec39abe [IMP] base: get_view_id becomes private
Add new helper get_view
Remove dangerous documented comment

Part-of: odoo/odoo#85110
2022-03-29 10:56:16 +02:00
Gorash 880954ebfc [IMP] *: remove _render from ir.ui.view and simplify report
There were inconsistencies in the calls to `_render`.
* the view context could contain information that misled developers.
Indeed, the context and value of the view are not supposed to be found
in the rendering. Thus by calling `ir.qweb` with the name of the
template, we ensure that there is no unwanted information and in
addition the cache key is that of the name of the template which saves
a query.
* the context used for rendering was modified by a method on
`ir.ui.view`, except this is not information used by this model. There
is now a `_prepare_environment` method residing on `ir.qweb`. This
method allows to modify the value dictionary as well as the context in
which the rendering will be done. This preparation of the data as well
as my security check is done only once per rendering. This also saves
some queries
* Freeze options for rendering were inconsistent. It could be that
options on which rendering depends were not part of the cache key. Thus,
depending on the user who generated the generation of the rendering
function, there was or was not information in the template. For example
for automatic branding. This is no longer possible, because it is the
context that is used. The options serving as a cache key are only
recorded for information (for the profiling system for example). A
simplification of the `ir.qweb.field` models could be made.

The report rendering and call `ir.qweb` instead of `ir.ui.view`.

Part-of: odoo/odoo#85110
2022-03-29 10:56:15 +02:00
Antoine Guenet 62f9e01d92 [REF] mass_mailing, web_editor: don't redefine target in generic methods
Commit [1] redefined the target in generic methods of snippet options so
that some buttons of the Design Tab snippet option could target a
different node than their parent option. This reverts that in favor of
the more generic `apply-to` data attribute.

[1]: c4bfedc37b

closes odoo/odoo#87325

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-28 17:55:28 +02:00
Antoine Guenet 6fc2f208ca [FIX] mass_mailing, web_editor: remove animated shapes from mass_mailing
Email clients do not support svg images so we can't support animated
shapes in mass_mailing. This removes them from the options.

task-2760157

Part-of: odoo/odoo#84926
2022-03-28 10:45:46 +02:00
Antoine Guenet 2e23548b39 [IMP] web_editor, mass_mailing: convert svg to png to use shapes in mail
This allows users to use the shape feature on images in mass_mailing.
Since email clients do not support the svg file type, it converts these
svg images into png images on save.

task-2760157

Part-of: odoo/odoo#84926
2022-03-28 10:45:45 +02:00
Thibault Libioulle a423289419 [FIX] web_editor,website_sale: fix click on pricelist while editing
Prior to this commit, when a user edits the Shop page, clicks on the
pricelist dropdown and finally clicks elsewhere, a traceback occurs:
`Uncaught TypeError: Cannot read properties of undefined (reading
'getColorNames')`

This commit ensures the link tools is not toggles on dropdown links,
i.e. the customizable links selector does not contain the dropdown
anymore.

task-2695091

closes odoo/odoo#87300

X-original-commit: 73b98a53e8bd19b3b96502d6006b002819287e44
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Thibault Libioulle (tle) <tle@odoo.com>
2022-03-28 09:50:36 +02:00
Benjamin Vray 86e3bb5e24 [FIX] web_editor: fix data-no-check on specific snippet options
Before this commit, if an option targeting an element had a
data-no-check attribute this had the effect that all other options
targeting this element were also displayed even if they did not have a
no-check attribute (no-check => display the option even if it is
a non-editable element).

The issue came from the is() function of _computeSelectorFunctions which
did not take into account the no-check as it should.

Note: this is fixed in stable only as custom apps may rely on the broken
behavior. An issue with this in stable can be met by *hiding* the
related unwanted options with `_computeVisibility`. No case of this
problem currently exists in the Odoo codebase (but it will, that's how
the bug was found).

task-2710582

closes odoo/odoo#86011

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-25 16:51:45 +01:00
Nicolas Bayet 6b8bf0dd41 [FIX] web_editor: prevent opening linktool on uneditable links
Before this commit
When trying to open the linktool on link that are not
`isContentEditable`, the linktool was initialized and not
showed in the sidebar.

After this commit
As it does not make sense to edit a link that is not editable,
prevent the linktool from being initialized in the first place.

task-2802592

closes odoo/odoo#87203

X-original-commit: 4a634f2c5bfceb3f2dc200f9b391ef1cdbc0e697
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-24 18:10:55 +01:00
Antoine Guenet ad7c0d8ea4 [FIX] web_editor: prevent traceback on remove highlight color
This prevents a traceback when no closest block to the root node can be
found in the sanitizer.

task-2796371

closes odoo/odoo#87187

X-original-commit: 2104f33985472cd59f067d2f1403518a332fac6d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-24 18:10:51 +01:00
Antoine Guenet c4bfedc37b [ADD] mass_mailing, web_editor: add options to design a mailing globally
This adds options to the "Design" tab of mass_mailing so the user can
edit its stylesheet directly.

task-2789287

closes odoo/odoo#86881

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-24 17:12:12 +01:00
Antoine Guenet a9e79f8bda [ADD] web_editor, mass_mailing: add a "Design" tab to mass_mailing
This adds a tab to mass_mailing, that will be used to style the mailing
globally.

task-2789287

Part-of: odoo/odoo#86881
2022-03-24 17:12:12 +01:00
Benjamin Vray 29eda89bc7 [FIX] web_editor: fix scrolling the page while dragging a snippet
Since the commit [1], it's no longer possible to scroll the page while
dragging a snippet thanks to its thumbnail.

This is because for mass mailing the scroll element is not the same and
to check it we were looking for a class in the DOM. For that we did a
jQuery 'find' but without a 'length', the jQuery 'find' is always
truthy.

[1]: https://github.com/odoo/odoo/commit/29c6c80ac7009aa5068c763778342f7c6b115fad

task-2798872

closes odoo/odoo#87021

X-original-commit: d4b231222c5baf726332deddfe6d4c5e3e7865db
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-23 10:59:55 +01:00
Antoine Guenet 6b9ca81e76 [FIX] web_editor: replace oe-zws-empty-inline with new data attribute
This adapts new code which uses `oe-zws-empty-inline` to use the new
name `data-oe-zws-empty-inline` instead.

closes odoo/odoo#86930

X-original-commit: c8d892496e78beea804c80091f4b06dc2e858b59
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-22 22:12:56 +01:00
Antoine Guenet 6cd42319fa [FIX] web_editor: properly clean zero-width spaces inserted for formats
When inserting a format with a collapsed selection, we need to insert a
zero-width space. It should not be saved so we need to isolate it and
put the "oe-zws-empty-inline" attribute on its parent so it gets cleaned
up by the sanitizer.

X-original-commit: 4ce274ba39cd8046b9ef4e0b99df66913375f993
Part-of: odoo/odoo#86930
2022-03-22 22:12:55 +01:00
Antoine Guenet f41c3e4a42 [FIX] web_editor: unformat only if full selection is bold
Take `<p>a<b>bcde</b>f` and select the whole paragraph. If you click the
"bold" button, you would expect the whole paragraph to become bold. Only
if you only select "bcde" do you expect to unbold it. This is the
behavior of other editors. Odoo-editor so far was unbolding as long as a
part of the selection was bold.
The same applies to other formats.

Currently the format buttons are active when the closest start container
is that format but it should be active when pressing it would undo the
format, ie when the whole selection is that format. This harmonizes it
with the browser defaults.

task-2754127

X-original-commit: 69c5db26f81ace1a9a032b2ef7f488c997be00ad
Part-of: odoo/odoo#86930
2022-03-22 22:12:55 +01:00
Antoine Guenet 18ca8b44cd [FIX] web_editor: properly detect background color in toolbar
When a background color is applied on an ancestor, while it's visibly
there, `getComputedStyle` doesn't know. Because it did depend on it,
the toolbar showed the wrong color in these cases.
Eg: `<span style="background-color: red;"><b>a[]bc</b></span>` was
showing no background color.

task-2778416

X-original-commit: a125933b34500d51183bc5eb02a531fb3b293de5
Part-of: odoo/odoo#86930
2022-03-22 22:12:55 +01:00
Antoine Guenet 0f1071d309 [FIX] web_editor: properly toggle active link button
The link button was toggling its active state on every update of the
toolbar because we weren't passing the toggle function a boolean. and
if the element we were passing it was `undefined`, it triggered the
default behavior which is to just toggle. Instead we want it to be false
if the element is `undefined`.

X-original-commit: 7aecd36a169033a89defeb00ba0ae53cd64cdcd5
Part-of: odoo/odoo#86930
2022-03-22 22:12:55 +01:00
Antoine Guenet ab37804400 [FIX] web_editor: properly apply/unapply underline and strikeThrough
Underline and strikeThrough styles are special beasts in that they both
are applied to the `text-decoration-line` property. Unlike `font-weight`
or `color`, They behave like a border: setting
`text-decoration-line: none` to an element won't undo the value of the
parent and therefore the text will still show the decoration applied to
its parent. Similarly, nested decorations will apply over each other:
a text node whose parent has an underline decoration and whose
grandparent has a line-through decoration will be both underlined _and_
struck through.
Consequently, we can't treat these styles the same way we treat bold,
italic and colors:
1. To undo the style, we have to split the text from its styled ancestor
2. To apply eg underline to a struck through text, we have to insert a
   new span.

task-2778416

X-original-commit: 93102a7dcb3e2c1a5803ab99f2f924b0b24e44c2
Part-of: odoo/odoo#86930
2022-03-22 22:12:54 +01:00
Antoine Guenet fa417893a4 [FIX] web_editor: handle arrow keys next to zero-width spaces
Consider the following situation: `<p>a[]b<span><zws></span>c</p>`,
where `<zws>` is a zero-width space and `[]` is the collapsed selection.
On pressing the `ArrowRight` key, we want to enter the `<span>` so we
don't press once to be after the "b" then once again to be before the
`<zws>`. The cases with a non-collapsed selection, and with the left
arrow are analogous. This is what this commit allows us to handle.

X-original-commit: 8e1d5ff3f3bdef8ca2f0eb069c62140260aad3f6
Part-of: odoo/odoo#86930
2022-03-22 22:12:54 +01:00
Antoine Guenet 6844ff5a3f [FIX] web_editor: apply format, font-size and color collapsed
When the selection is collapsed it was impossible to set a format (bold,
italic, underline, strikethrough), a font-size or a color. This makes it
possible by inserting and selecting a zero-width space first, then
placing the caret to its left when we're done.

task-2778416

X-original-commit: b4eb0fe69bce5ca18d8450cd7118740f1d31f780
Part-of: odoo/odoo#86930
2022-03-22 22:12:54 +01:00
Antoine Guenet 3164697a7e [FIX] web_editor: ensure all formats use spans
The bold format is overridden to use inline style on a <span> rather
than a <b>. The other formats (italic, underline, strikethrough)
continued to use the default browser behavior. This harmonizes them.

X-original-commit: ce59bbd1c13d7fd4cc6971b89cc95386d95fcd75
Part-of: odoo/odoo#86930
2022-03-22 22:12:53 +01:00
Antoine Guenet 7411fc970b [FIX] web_editor: use styling commands on shortcut too
When pressing the italic or underline buttons, we pass through a command
in the editor. Their corresponding keyboard shortcuts however were not
intercepted by the editor and were therefore triggering the default
browser behavior. As a result we had different behaviors when using the
buttons and the shortcuts.

X-original-commit: 2e3c3b3a15fa6ff4fa209fc7dbac10864f8898a2
Part-of: odoo/odoo#86930
2022-03-22 22:12:53 +01:00
Benoit Socias a042851853 [FIX] web_editor: fallback on URL search when shape not found from slug
Since [1] illustration shapes are only obtained from their slug. Before
they were obtained from their URL.

After this commit the old behavior is restored as a fallback in case the
illustration shape cannot be found from its slug.
This is needed to allow importing shapes into the system from data
files.

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

task-2793073

closes odoo/odoo#86858

X-original-commit: 91f2a989ddd7961f92a377b1bf74cc741dcbd3d0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-22 13:36:56 +01:00
Nicolas Bayet 1428fe9542 [FIX] web_editor: set border and width of the table upon paste
task-2793106

closes odoo/odoo#86859

X-original-commit: e07a40f98999560aaa494bf2561811894e7775f7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-22 12:00:45 +01:00
Nicolas Bayet c721d06995 [FIX] web_editor: load odooEditor base style
Before this commit
The style for `li.oe-nested` was loaded only when the editor loaded.
The problem is that the style needs to be visible even when the editor
has never been loaded.

After this commit
The style for `li.oe-nested` is always loaded in the backend and in
the frontend.

Task-2793528

closes odoo/odoo#86817

X-original-commit: 6c26e24c3d52410c0a3a06ee9a9d0aad6858a438
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-21 17:57:09 +01:00
Benoit Socias e9e1864153 [FIX] web_editor: decode base64 of uploaded non-image documents
Since [1] non-image documents uploaded in web editor were stored as
received in base64 without being decoded.
This led to downloading them as they were stored in base64.

After this commit uploaded documents are base64-decoded before being
stored.

Steps to reproduce:
- edit a web page
- drop a "Text - Image" snippet
- replace the image
- upload a document (PDF, TXT...)
- save page
- download document
=> received document was base64-encoded

[1]: https://github.com/odoo/odoo/commit/6b8752604898bf2b583b7f5334e35f6a1583595e

task-2782269

closes odoo/odoo#86812

X-original-commit: b0218b8ff50c7cea2a018d20a62e63510bfdd01e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-21 17:57:01 +01:00
Nicolas Bayet 691f574cb3 [FIX] web_editor: allow to paste images in the editor
task-2734733

closes odoo/odoo#86797

X-original-commit: 996b41b36ae5ea935760a5962887b2fcc02c86fa
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-21 17:00:56 +01:00
Benoit Socias 79a8e4fe8f [FIX] web_editor: use valid properties for hovered custom outline button
Since [1] the CSS property reset for hovered outline buttons is using
invalid property values.

After this commit the color and image are only reset on non-hover:
- the `background-color` is already set to `none` by `.btn`,
- the `background-image` is only set if defined on the button's style -
there is no need to reset it.

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

task-2633169

closes odoo/odoo#86699

X-original-commit: 8530235bff30bfcad55cf39927f0733d30fe2eee
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-20 22:09:12 +01:00
xlu-odoo 1f7d6213d4 [FIX] web_editor: style upload notifications
When applied, this commit will add correct classes and structure to fix
the style of upload notifications in the web editor. When an user
uploads an image, he gets a progress and validation (or error)
notification. We changed how notifications look at [1], but this
particular notification did not get the correct style.

[1]: https://github.com/odoo/odoo/commit/2629348090d6eabe8f9d3ae70a41f7ff7d45bbb6

task-2791078

closes odoo/odoo#86172

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-18 15:11:34 +01:00
Benoit Socias 3cf9416175 [FIX] web_editor: remove custom gradient button from colors inventory
Since [1] when resetting the background color of the header, the footer
or the copyright, the 'menu-custom' property is saved as the 'false'
string.
There is no visual effect of this problem, but in case that property is
used in an SCSS `color-yiq` function call, it will trigger an error.

This commit solves this by removing the root cause of this 'false'
string: during the initialisation of color palettes a list of named
colors is built by browsing the color buttons and associating their
data-color attribute to their background-color, except for buttons
containing a gradient color.
Unfortunately this inventory also looked at the "Custom" gradient
button: this button has no background color (and was thus not detected
as being a gradient and therefore not excluded from the inventory) and
it has data-color="false". It therefore introduced a mapping between ""
and "false" - thus making the reset operation's empty string mapped to
the "false" string. This commit removes that button from the named
colors inventory.

Steps to reproduce:
- select the header
- open the "Colors" palette
- click on the None button (the trashcan icon)
=> the customization properties attachment contained a line
```
'menu-custom': 'false',
```

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

task-2633169

closes odoo/odoo#86548

X-original-commit: 2f28c37f2386ad7c1dcca79d9b516820f9607d8d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-16 23:22:46 +01:00
Antoine Guenet f50eaa4412 [FIX] web_editor: prevent infinite scroll in mass_mailing in dialogs
When opening mass_mailing in a dialog (eg, in marketing automation),
dragging a snippet to the bottom of the page (without dropping) caused
an infinitely growing scrollbar on the document element.

Note: this revealed that in that particular context the auto scroll to
snippet feature is broken and while dragging we have an extra scrollbar,
on the editable area. In order to fix that, we need to be able to
identify from within the iframe the case where mass_mailing
self-resizes. This involves changing the view to add an option which
will set a class on the document element. This is not acceptable in
stable and will therefore be fixed in master instead.

task-2742664

closes odoo/odoo#86506

X-original-commit: 29c6c80ac7009aa5068c763778342f7c6b115fad
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-16 16:07:22 +01:00
Antoine Guenet 8f7d64e2de [FIX] web_editor: make sure all external links open in new tab
This collects all external links on clean the editor so as to make them
open in a new tab.

task-2740021

closes odoo/odoo#86289

X-original-commit: 8d2c8b4bad7a7aaa313aad361b48d77823841dbe
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-14 09:42:35 +00:00
Nicolas Bayet 29cf849009 [FIX] web_editor: prevent reloading page when searching icon
Before this commit, when the user hit the key enter, in the media
dialog, in the icon tab, in the input, the page was reloaded instead
of searching for the icon.

Task-2733154

closes odoo/odoo#86218

X-original-commit: 7b3bead23f9bc38003afd4253f4ff4556b550598
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-11 08:44:40 +00:00
Benoit Socias f2fa5b0a37 [FIX] web_editor: restore transitions when finding a gradient background
Since [1] the class `o_we_force_no_transition` was not removed when
selecting a snippet when the background color was a gradient. (It was
however removed when selecting a background color.)

After this commit the class is removed in that situation just like for
any other `data-select-style` attribute.

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

task-2633169

closes odoo/odoo#86126

X-original-commit: ed530aef3c6d99712db055099b5f06a31e91d9cf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2022-03-11 08:44:33 +00:00
Nicolas Bayet f126f0c95b [FIX] web_editor: reset content when resuming collobartion idleness
Before this commit, when:
- client A close it's laptop temporarily, client B
- client B save another content
- client A re-open it's laptop
then, client A still have the outdated record version.

Now, if client A reconnect and the record has been modified, the
editor gets reset with the updated record.

Task-2745104

closes odoo/odoo#86149

X-original-commit: 1070d37a6c02c8a873336f4533d1e319a8762405
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-10 09:00:13 +00:00
Nicolas Bayet aaf70d3692 [FIX] mass_mailing: automatically open linktools when clicking a link
Task-2702179

closes odoo/odoo#86042

X-original-commit: d0003257cb194b8c06483c38ed742a5521602204
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-08 15:54:51 +00:00
Brieuc-brd 93d5ace34a [IMP] web_editor: add device shapes for images
This commit adds a new category of image shapes: Devices.
The purpose is to give the possibility to add images in device mockups
with the image shapes.
To use it correctly the image needs to be in a specific ratio depending
on the shape. To help the user to have the perfect render, an average
resolution is shown when hovering the thumbnail of the shape.

task-2666049

closes odoo/odoo#79068

Related: odoo/design-themes#525
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-08 15:54:44 +00:00
Benjamin VrayandTom De Caluwé dc1ca34448 [IMP] web_editor: add image shapes with perspective 3D
This commit adds the possibility of applying a "perspective"
transformation on image with some image shapes (e.g. devices). For
technical reasons, the only way to apply this 3D transformation is to
modify the image in a canva.

Since the 2D context of the canvas doesn't support projective
transformations, we approximate the result using multiple affine
transformations on smaller parts of the image.

task-2666049

Part-of: odoo/odoo#79068
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
2022-03-08 15:54:44 +00:00
Arthur Detroux (ard)andBenjamin Vray 63cf8a693a [IMP] web_editor: add support for fixed size SVGs for image shapes
With this PR's next commits introducing device shapes, it was needed to
have SVGs with a fixed size. Originally the code was created with the
idea that svg will take the size of the image they're going to clip.
This commit introduces a data attribute that allows SVGs to bypass
being resized so that they always keep the same aspect ratio.

task-2666049

Part-of: odoo/odoo#79068
Co-authored-by: Benjamin Vray <bvr@odoo.com>
2022-03-08 15:54:44 +00:00
Nicolas Bayet 98073c3bb0 [FIX] web_editor: prevent editor powerbox hint duplication
Whenever the browser is lagging between multiple enter,
the command hints were not being updated until the browser
main thread process the event queue.

Task-2728794

closes odoo/odoo#85935

X-original-commit: 8525f6ea677e89a932c783545c1d9dcf9b4d175a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-07 13:30:51 +00:00
Jorge Pinna Puissant cac3ba62e5 [IMP] test_lint, *: add caughtErrors option to no-unused-vars
All named arguments on the catch block must be used. If for some motive
the named argument on the catch block is not used, its name must begin
with '_'.

closes odoo/odoo#85569

Related: odoo/enterprise#24867
Related: odoo/design-themes#552
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-03-02 13:05:42 +00:00
Jorge Pinna Puissant bc20eb4790 [IMP] test_lint, *: enable no-unused-vars rule
Part-of: odoo/odoo#85569
2022-03-02 13:05:42 +00:00
Nicolas Bayet 923a92a0bb [FIX] web_editor: only include website commands in website
task-2696972

closes odoo/odoo#85628

X-original-commit: c1ff3260a8e09ba4af3ad44138d44d4457c7c689
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-02 08:36:10 +00:00
Nicolas Bayet 1b4a390b73 [FIX] web_editor: select checklist when language is rtl
task-2734731

closes odoo/odoo#85627

X-original-commit: 0a236b11e770b6a8db5192685a2c36ce1e303399
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-02 08:36:06 +00:00
qsm-odoo 1ab7210ae3 [REF] web_editor, website: review the web_editor.assets model
- Three controllers were actually useless as the relevant public methods
  of the web_editor.assets can be called directly via RPC in the related
  usecases.

- Review the web_editor.assets model methods organization in the model
  declaration.

closes odoo/odoo#85392

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-02-28 12:56:05 +00:00
qsm-odoo aec6925b17 [MOV] web_editor: move web_editor.assets main methods at the top
Part-of: odoo/odoo#85392
2022-02-28 12:56:04 +00:00
Thibault Delavallée 2a3d8dd1c2 [MOV] various: move ir.qweb.fields code into right files
When working on qweb fields it is difficult to find some custom override as
they are never in the right file. Finding them is always a bit of random pick.

Task-2607416

Part-of: odoo/odoo#74171
2022-02-28 11:07:39 +00:00