When the Wysiwyg is used by website, multiple editable elements are
possible, and each of them carry the related record's model and id in
the element's dataset.
On the other hand, when the Wysiwyg is used by the html field, there's
only one root editable element, and such information is not present in
the editable's dataset, but in the widget's options object.
Before this commit, when saving the content of an html field, modified
images were converted to attachments without the correct reference to
the record's model and id.
This commit makes sure that such information is passed to the route that
handles attachment creation.
task-3495668
closesodoo/odoo#135806
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Commit [1] added a check for the closest ".o_dirty" editable element in
order to define which editable is used for obtaining the model and id
reference from its dataset, and also to avoid multiple attachment
creation for the same image.
But such check for the closest ".o-dirty" element evaluates to null when
the Wysiwyg is used by the HtmlField component, as such class is not
added to editable when saving/committing changes. This resulted in
skipping the attachment creation for pasted, dropped or modified images.
After this commit, attachment creation for modified images is not
skipped if an element with the ".o_dirty" class does not exist.
task-3495668
[1]: https://github.com/odoo/odoo/commit/e631bff05a3588f3304b75b6a0018b096c13f68d
Part-of: odoo/odoo#135806
Steps to reproduce the problem:
- Go on the "Courses" application and select a course.
- Edit.
- Replace the main image of the course with one of your own.
- Save.
-> The function route `/web_editor/modify_image/` is called two times
leading to the creation of two attachments instead of one.
The `savePendingImages()` function iterates through editable elements
and calls `/web_editor/modify_image/` (through `_saveModifiedImage()`)
for each image with a `o_modified_image_to_save` class inside those
elements. In our case, the image has an editable element parent that has
itself an editable element parent. Because since [1], the
`o_modified_image_to_save` class is removed after the `rpc` call, this
class is not removed while the `savePendingImages()` loops on the
second editable element parent of the image. As a result,
`/web_editor/modify_image/` is called two times. Note that before [1],
the process was partially wrong as well. `/web_editor/modify_image/` was
indeed called only once but with the wrong arguments. This is now fixed
by ensuring that `_saveModifiedImage()` is called with the arguments
coming from the closest editable element. The same logic is applied for
the call of the `_saveB64Image()` function.
[1]: https://github.com/odoo/odoo/commit/8872aab2d108ff3e2ec06ca4579479898c87738c
task-3451349
closesodoo/odoo#134189
X-original-commit: 8ff0151cf06c37e8ee2e344bc96c063b4921ce43
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
This commit, adds a new python method (`web_save`) to save a record, and
optionally read-it again in one rpc call. This optimizes the current
behavior that is to save a record in one rpc, and read-it in a second
rpc.
web_save, will receive the list of IDs of the records to save (if this
list is empty it will create the records, if not, it will write on the
existing records), the list of changed fields, and the unity
specification as optional argument to read the created/modified records
(if the specification is not set, the function will return a list of IDs
of the created/modified records).
closesodoo/odoo#133021
Task-id: 3453184
Related: odoo/enterprise#46559
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
As described in #129974, the colorpicker cannot cache a promise
protected by `useService`. #129974 fixes the issue by through non
idiomatic practice (calling a service that is not protected by
`useService`). This commit fixes the issue idiomatically.
This commit caches the promise directly from a service and removes the
caching code from the `ColorPalette`.
task-3446691
closesodoo/odoo#130789
X-original-commit: 1d2e54088b0f0e28464ab6aa884fb2e1110e8e04
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit removes legacy patch/unpatch functions and adapts their use
by using the modern patch. There was also a custom patch function used
in tests which has been replaced too.
closesodoo/odoo#130867
Related: odoo/design-themes#685
Related: odoo/enterprise#45271
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit removes the legacy implementation of the MockServer
and test utils making it available in the test environment (e.g.
addMockEnvironment).
Part of task~3439226
closesodoo/odoo#130671
Related: odoo/enterprise#45141
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.
task 3410198
[1]: 19ea1ac08043e22a811630968e44715cc3bfc495
Part-of: odoo/odoo#125716
When the mechanism that synchronise odoo fields contained an
unremovable, even though no unremovable got removed, the Odoo editor
would rollback as the syncing mechanism would set innerHTML to the
synced nodes, which would remove the unremovable. To prevent the
rollback in that kind of circumstance, this commit introduce a new
method on the OdooEditor `withoutRollback`.
task-3436834
closesodoo/odoo#129320
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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
In the context of an urgent htmlField `commitChanges`, there is no time to wait
the response of `rpc` calls, therefore this commit proposes to use the same
strategy as `_toInline` for `savePendingImages` and not await the result of
the promises before a first `updateValue` if the commit is `urgent`.
This will allow to save most of the changes during a `beforeunload` scenario.
ENTERPRISE PR: https://github.com/odoo/enterprise/pull/42644
task-3372343
closesodoo/odoo#128949
X-original-commit: ba94629cb7fd1381871c37d34104f2511a4d4863
Related: odoo/enterprise#44307
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, when viewing the content of an html field in
readonly mode, internal links (same origin or relative links) that did
not have the target attribute set to "_blank" would be opened in the
same browser tab. This is undesired, and particularly disturbing when
the content is inside an iframe.
This commit ensures that, in readonly mode, all links are opened
in a new tab.
task-3323602
closesodoo/odoo#125382
X-original-commit: cb84f993bbf38130482c1f50e550bfdf94a60845
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Steps to reproduce:
- Go on a backend HTML field (project task description for instance)
- Write and select some text
- Open the text background color colorpicker
- Hit the "reset" button (the trash icon)
=> The text becomes black (or white in dark mode)
This was because of [1] which indirectly removed the CSS variables
`--black` and `--white`, on which the colorpalette relies.
Note: the test update made by the original commit was lost in the
forward-port because [2] removed the test. It will be restored at some
point thanks to task-3177674.
[1]: https://github.com/odoo/odoo/commit/28444a5792b9929f5250e38f3f864694e22e9370
[2]: https://github.com/odoo/odoo/commit/49297bc7bba75541ca139e6c84e0d3b311765145closesodoo/odoo#125131
X-original-commit: 907c5b6cc24e0b86c219cda1299a87b7901f4e76
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the line-height of the body was not properly
inherited where it should. It is defined as a CSS variable and its value
was incorrectly retrieved (if the value is 1.5 and the font-size is
10px, `getComputedStyle` returns 15px instead of 1.5). Other properties
related to fonts were likewise improperly inherited.
X-original-commit: 12ae698bd9aff8466d69819e0b849752f967c126
Part-of: odoo/odoo#124465
Several issues were found regarding the responsiveness of columns,
especially in the Masonry snippet. This implements a new, more robust
approach to responsiveness of columns, based on article [1], where each
column is wrapped inside a new table, itself wrapped in an inline-block
div element, and all adjacent wrapped columns are in turn wrapped in a
common table cell:
```html
<.container>
<.row>
<.col id="A">
<.col id="B">
</.row>
</.container>
```
becomes something like:
```html
<table>
<tbody>
<tr>
<td>
<div style="display: inline-block;">
<table>
<tbody>
<tr>
<td id="A">
</tr>
</tbody>
</table>
</div>
<div style="display: inline-block;">
<table>
<tbody>
<tr>
<td id="B">
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
```
with some additional attributes and styles to make it work.
[1]: https://www.litmus.com/blog/mobile-responsive-email-stacking/
task-3184107
X-original-commit: 3ddba4dbd57891c2d9fc80fb7aa0dd08338fe3f6
Part-of: odoo/odoo#124465
The "readonly iframe" mode of html_editor does not do
the processing required to ensure all links target a new tab when
the setup is called more than once.
As this happens often, links effectively did not redirect to a new tab.
Additionally sandboxedIframe did not allow new tabs to open.
We add `allow-popups` and `allow-popups-to-escape-sandbox`
to the sandbox attributes.
This is safe as the popup will not have access to the odoo window.
Which should mean it's as safe as opening a link without the sandbox.
opw-3337670
closesodoo/odoo#124395
X-original-commit: 61b6b6bf6181fe703cd3d455dba9004e1fad7135
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Thiry Renaud (reth) <reth@odoo.com>
As it holds full HTML documents, mail.mail often encounters issues with
the html editor.
We piggy-back off the intoduction of the switching
behavior between code-view and readonly-view behavior introduced in
a5c0085ce91570c6c961e3293dfe50f4faba6043
The 'sandboxed preview' mode can now be enabled with an option
and will ensure all content can only be viewed in a sandboxed iframe
or in the code editor.
This re-introduces editing, which was mistakenly fully disabled in the
usability fix that introduced body_content here:
5055b374c3bac0126f441dad61afd7e0b68b1370
Some tests are added to ensure the key points of this commit remain
the same. Tests are re-ordered alphabetically to match the order
of execution, making debugging easier.
task-3255777
closesodoo/odoo#121976
X-original-commit: 062569ef042f3b01044c5e4cdbd8b71e96bfd39d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
In 2389f77c25f3c4dcfd609a8674dc673703cac6a1
containsComplexHTML was added to allow editing of html content
that would otherwise break when inserted as-is in a DOM
For this we added a rule to always display the code view toggle button.
This should not be the case when the field is marked as readonly.
Switching to the code view in readonly mode will cause a traceback.
task-3255777
X-original-commit: 243b7879ecad229aaefed3cdf0c64e7ae434d8ec
Part-of: odoo/odoo#121976
Before this commit : The library underscore.js and
underscore.string.js were used in the ODOO solution.
After this commit : Every usages of a function from
underscore.js lib has been replaced with native javascript.
The goal is to remove all usages of underscore.js and to
not use anymore this library in ODOO.
---
TaskId : 3246238
closesodoo/odoo#120437
Signed-off-by: Géry Debongnie <ged@odoo.com>
The way the live HTML editor for html_field works means the header
(and other nodes that should only appear once) are removed
and the content inserted inside the body.
This results in values being edited without the user being aware.
For emails, this results in any email using 'style' in the header
to break on GMail and other clients that do not support 'style'
outside of the header.
When an html_field is passed a value containing a header
the html_field appears readonly and the user is able to toggle
the code view. Which enables them to edit the 'raw' HTML and see changes
while preventing the presentation view from affecting the database value
task - 3035163
closesodoo/odoo#118920
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Thiry Renaud (reth) <reth@odoo.com>
Replaced _.each() functions (average 235 occurences)
Description of the refactoring this PR addresses:
Current behavior before PR:
There are underscore.js function enumerated above used in odoo.
Desired behavior after PR is merged:
These functions has been replaced by native javascript
prototypes/methods/functions.
TaskId : 3246238
closesodoo/odoo#118565
Signed-off-by: Georis François (fge) <fge@odoo.com>
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.
task id: 3162300
closesodoo/odoo#117305
Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
This removes calls to JQuery in the convert to grid tests and the
functions they test. In the process, these tests are abstracted for
better readability and maintainability.
closesodoo/odoo#113784
X-original-commit: 3eafc2d3425365bfb25b0540de95aab4e7d89ebf
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit abstracts the cell creation in the bootstrap grid inliner
tests so as to make it less wordy, easier to read, and easier to write.
X-original-commit: beceaf05f333596816623417f827ea8cdabc7097
Part-of: odoo/odoo#113784
When we convert a Bootstrap grid to a table, we sometimes need to create
filler cells to make sure the table has the same number of columns as
the grid. A mistake creeped into that process, and we were not applying
the max-width to the filler cells.
X-original-commit: a546eb1374bbe72606203ccd60322d5063a5de38
Part-of: odoo/odoo#113784
When inlining e-mails, we convert font icons to images by calling the
font_to_img route with the icon's dimensions. To get the icon's
dimensions, a call is made to `convert_inline`'s `_getWidth` and
`_getHeight` functions. These functions assume that calling
`getComputedStyle` on the icon to get its width/height will return a
value in pixels. However, this is not always the case. For example, if
the icon is in a hidden element, `getComputedStyle` can return "auto"
or whatever value is set in the icon's `style` attribute (e.g.,
"fit-content"). This commit ensures the return values of `_getWidth` and
`_getHeight` are always numbers as expected.
Doing this also reveals a false negative in the tests where the grid to
convert is not added to the DOM before calling `bootstrapToTable`. Since
`_getWidth` returned `NaN` in this case, `style.setProperty` failed
silently and no max-width was set on the cells. The tests didn't account
for the missing max-width, which now suddenly appeared with this fix
(NaN failed but 0 doesn't). This commit fixes the tests by adding the
grid to the DOM before calling `bootstrapToTable`, and adding the
expected max-width to the expected result.
X-original-commit: 73b404df9be1ba28a784711174cc19e7c599099e
Part-of: odoo/odoo#113784
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
When a big number is entered in an option field with units, it gets
automatically converted to scientific notation (1e+10) by Chrome.
This makes the unit conversion code fail because it mistakenly
interprets the 'e' as the unit.
This commit adapts the used regular expressions in order to include
the complete number in the number part even if it is written in
scientific notation.
Steps to reproduce:
- Use Chrome.
- Drop a "Banner" block.
- Set the "Position" to "Repeat Pattern".
- Type a long number in the "Width" option.
=> Error popup.
task-2853161
closesodoo/odoo#109078
X-original-commit: a554e102a7f9ca2a0b7f64573adffa4b26a0b813
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
When CSS properties are updated, a check is made to verify whether the
new value is different from the old one. This process sometimes involves
unit conversions.
Since [1] when a CSS property is updated, it is also set before the
check, in order to verify whether it should be set as `!important`.
When the CSS property is a size, such as the `background-size` CSS
property, it is made of two dimensions. However the verification does
not handle that situation: it handles `15px auto` as being a single
number with the unit `px auto`, which is wrong.
The full comparison is made because the strings do not fully match:
when a size property is set to a measure followed by `auto`, it is
returned without `auto` when reading the computed style.
E.g. after setting `15px auto`, it is read as `15px`.
This commit adapts the CSS properties comparison mechanism by splitting
the size properties into their parts and comparing each part separately.
This commit also introduces a few tests about the already existing
CSS properties comparisons.
Steps to reproduce:
- Drop a "Banner" block.
- Set "Position" as "Repeat Pattern".
- Type "5" in the "Width".
=> It raised an error.
[1]: https://github.com/odoo/odoo/commit/d3c3dab8950abc25b29937605091d8ce32305fa4
task-2853161
X-original-commit: 07e471b9398e042c45182f1e8ca33e74dd8087a3
Part-of: odoo/odoo#109078
This commit makes use of the spellcheck hook to only enable the spellcheck attribute
on the textarea element when needed (on focused element). Since form view are now
always displaying a textarea, instead of relying on a readonly state, the textarea
used by the HtmlField always displayed red underline on typos.
This means the UI can become difficult to read if there are multiple red lines in
the text. Now, it is only present on focused textarea thanks to the useSpellcheck
hook.
This change can be noticeable in many apps, including notes from records and the
Knowledge editor.
A test has been added to verify that the hook enables/disables the attribute on the
contenteditable element used by the html editor..
task #2861428closesodoo/odoo#106866
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Imported unsplash in web_editor when it was not a dependency.
This caused the test to fail when web_unsplash was not installed.
As it is necessary to import it when the module is installed,
this test is moved to test_website as both modules are installed there.
(Also updated to ES6 import syntax + odoo-module style test)
task #3000801closesodoo/odoo#101672
X-original-commit: d85ba585ec4642a507d24ab94606a65970c635f3
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
An event was not called on uploading files in a media dialog.
This meant the parent of html field didn't know of the new attachments
which resulted in attachments being linked to no record at all
and not being garbage collected later.
This adds a reference inside the media dialog file input so that it can
trigger that event on behalf of the html field.
The attachments newly uploaded in media dialog are uneditable
to prevent users from unlinking attachments
that are still used in the body of the composer (causing the same issue)
Task-2860761
closesodoo/odoo#101405
X-original-commit: f4dd1eb3f25672e7309759c347e2b552c5652b2f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- 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>
convert_inline relies on getComputedStyle to crystalize var and calc
values. This however was conflicting with the fact that it also combines
positional styles (eg., margin-top, padding-left) together. This seems
to make getComputedStyle give out the wrong value with var and calc.
closesodoo/odoo#98003
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When clicking the link tools button, the focus is set inside the URL
input, changing the selection temporarily to that input. This means that
if the user clicks any other button from the toolbar right after using
that input, a command would try (and refuse) to execute outside the
editable area.
The link tool is now destroyed when clicking other buttons of the
toolbar, thus either validating the link or reverting it, and the
selection is reset accordingly.
The toolbar buttons are now correctly bound on click rather than some
being bound on mousedown and some on clicks, like colorpickers, which
would result in weird behavior such as a mousedown handler modifying the
dom which changes the layout so the mouseup event is on another node and
the click is not fired anymore. This commit streamlines the behavior to
use click so that this issue does not occur anymore.
task-2921844
X-original-commit: 798e3d0eb0017e05261ca0a0c5e29706629f0350
Part-of: odoo/odoo#97973
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
When converting Bootstrap grids to tables for e-mail compatibility, we
need to take into account Bootstrap offsets on columns. We were doing
this by adding that offset to the column but we actually need to create
an extra column instead.
task-2936705
closesodoo/odoo#97962
X-original-commit: 8beb7ac47c4cc86822bbc42b67ce5f6a44d41626
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
When we convert Bootstrap grids to tables for e-mail compatibility, we
need to complete rows whose column sizes don't add up to 12. The way it
was, the last column was stretched to fill up the row, which is wrong as
it can affect the width of its contents.
With this commit, a new, empty column is appended to the row to fill it
up without affecting the existing rows. This is a more accurate way to
emulate the behavior of Flexbox.
task-2936705
X-original-commit: 462b698732dbc0e71972ddbe86c687f4bb3f9492
Part-of: odoo/odoo#97962
The new list and form views were merged recently [1], but they
weren't activated because they weren't 100% ready yet. This is now
the case. This commit adds those views to the view registry. As a
consequence, a lot of qunit tests and tours needed to be adapted,
mostly for selector changes.
We also add legacy list and form views to the view registry, with
keys 'legacy_list' and 'legacy_form'. This allows to force those
legacy views when necessary. For instance, we did it in views
using complex custom legacy x2many field widgets that haven't been
converted yet (we have a compatibility layer but it isn't complete
and doesn't support every advanced usecases).
[1] odoo/odoo#92475
Part-of: odoo/odoo#78221
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
Due to the removal of btn-block we need to change the display to grid
> Dropped .btn-block for utilities. Instead of using .btn-block on the
> .btn, wrap your buttons with .d-grid and a .gap-* utility to space
> them as needed
https://getbootstrap.com/docs/5.1/migration/#buttons
Task ID: 2766483
Part-of: odoo/odoo#95450
The conversion of html to inline-styled html compatible with e-mail
clients failed to take into account styles that included `var()` and/or
`calc()`. Those didn't occur with Bootstrap 4 but are very common with
Bootstrap 5.
This allow that conversion by using `getComputedStyle` in those cases.
Task ID: 2766483
Part-of: odoo/odoo#95450
- BS5 JS use the `data-bs-toggle="dropdown"` attribute to
automatically enable the BS Component.
But in this case as the `.dropdown-menu` is only rendered when the
`.dropdown-toggle` is clicked we can't initialize the Dropdown at the
first render. So we do it manually.
- change .dropdown-menu by .o-dropdown-menu (owl)
-> to handle keyboard navigation we can't use BS dropdowns
- use currentTarget of event
As the event can bubble we use currentTarget to be sure to be at the
higher level in the DOM.
> All the events for the dropdown are now triggered on the dropdown
> toggle button and then bubbled up to the parent element.
- BS5 don't add .show on parent group anymore
-> dropdown show class not on the same node on BS5
- avoid dropdown warning using margin in CSS
BS5 show a warning if we use margin statically in CSS for a dropdown.
> Popper: CSS "margin" styles cannot be used to apply padding between
> the popper and its reference element or boundary. To replicate margin,
> use the `offset` modifier, as well as the `padding` option in the
> `preventOverflow` and `flip` modifiers.
- adapt the systray activity dropdown for mobile
On desktop positions are now dynamic and on mobile it's static
- In BS5 the CSS `bottom: 100%;` is not more applied to the
`.dropup .dropdown-menu` selector.
- Change right -> end and add data-bs-popper="none" to avoid
Popper interaction
Task ID: 2766483
Part-of: odoo/odoo#95450
Odoo-Editor, having originally been developed with the purpose of being
a standalone library, was put into a `lib` folder. Since in the meantime
the library plans were aborted and since its presence outside the `src`
directory makes translations unavailable for it, this moves the editor
to `src/js/editor/odoo-editor`.
task-2880723
Part-of: odoo/odoo#94516
The fix 1b80fe9 removed the behavior that made `.o_not_editable`
`contenteditable=false`. Without this behavior, other issues could
arises.
closesodoo/odoo#94889
X-original-commit: 4e7d6e1a70e44df3476c2602119fbcedc7c04199
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit mocks the website service for all the QUnit tests.
As the website module now defines a patch on the WebClient and NavBar
components, adding the website service, this service needs to be mocked
for all the tests. This is done by patching the QUnit.testStart hook.
Also, after the addition of the new media dialog, this component is
mocked at the field html unit test.
See merge commit for more information.
task-2687506