* web
The document/image tab in "Select a media" Dialog were not displaying
any info when there was no document/images to load.
Now there is a message with the same image as the backend.
The "All attachments have been loaded" message is only displayed if
there is no more documents to display after using the button "Load More".
The "Load More" button is removed in the backend if there is no
documents/images.
Part of https://github.com/odoo/odoo/pull/33195
task-1945874
closesodoo/odoo#33195
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
* web
"Document" tab in "Select a media" Dialog was displaying all the assets
files. Now all files containing "assets_" are excluded from the
"Document" tab. This is similar to the regenerateAssets function in
debug_manager that deletes assets based on this criteria.
For consistency the Assets Domain is now a utils.js function
Part of https://github.com/odoo/odoo/pull/33195
task-1945874
The reason this widget was moved is that the next improvement
([IMP] base: Configure document layout) defines a new field (FieldColor)
which needs to call the colorpicker dialog inside of the base module.
This couldn't be done while the dialog was located in the wysiwyg assets.
Before this commit, when a snippet was cloned, its animation was not destroyed
first. The flow was:
1. Clone the snippet (DOM) - web_editor trigger `snippet_cloned`
2. Start cloned snippet animation - website listen `snippet_cloned`
This was causing bugs, eg facebook snippet for which the animation is to create
an iframe containing the facebook widget.
When cloning this snippet, its iframe would be cloned to, then its animation
would be started, creating another iframe.
To fix such flows, the snippet cloning flow should be:
1. Strop the snippet animation
2. Clone the snippet (DOM) - web_editor trigger `snippet_cloned`
3. Start cloned snippet animation - website listen `snippet_cloned`
4. Restart the original snippet animation
task-1951466
closesodoo/odoo#35029
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Having an assert that randomly breaks is quite annoying, as this assert
is not critical and breaks once every 100 - 120 builds. It can "safely"
be commented out before being fixed
closesodoo/odoo#35043
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
Under certain unknown conditions, the range cannot be applied and
triggered an error. In order to allow the user to keep editing, we need
to prevent the dialog from showing, hence the use of `console.error`.
If this error appears, the carret is moved to the beginning of the focused
node.
If this error appears, then bullet can generate an error (I managed to
have the bug once or simulate it by manually breaking the dom and range)
We suspect a wrong snippet custom javascript code.
see: https://github.com/odoo/odoo/pull/34188closesodoo/odoo#34871
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
This fixes a bug in Website, that can be reproduced like so:
- insert a snippet
- insert a char in it
- 2x CTRL-Z
The second CTRL-Z didn't do anything because Summernote moved the range
to the header, which is not editable. This fix moves the range to the
first editable element in the editor in these cases, thereby keeping the
focus in an editable area, and ensuring that hotkeys still function.
The history feature being non-tested as of this version, no test could
be added for this fix.
closesodoo/odoo#34834
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before 8557bcf the URLs were never rewritten for multilang, which was an
error and could duplicated the number of requests on frontend.
Since 8557bcf the URLs are rewritten. In Odoo the werkzeug library is
used to parse the URLs (this is similar to python parsing URL but works
in python2 and python3 the same), and in this particular instance it
chooses that tel:800800 is website http://tel:800800 and not a telephone
number.
The problem is when the url uses the uri 'tel:' and only numbers as a
phone number, if the user uses the global format for telephone number
(with the +) or using a separator for the numbers (e.g. '-' , '/'), in
these cases there are no problems parsing the url (phone number RFC:
https://tools.ietf.org/html/rfc3966).
This commit changes the uri 'tel:' to 'tel://' this one is correctly
parsed by the werkzeug library.
opw-2029844
closes#34306closesodoo/odoo#34586
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
- To enable loop on a video, only setting the 'loop' URL parameter
to 1 will not work anymore. We also need to set the playlist parameter
to the video ID.
- Sound is no longer allowed in autoplay because of new autoplay
policies of most browsers. To make autoplay work, the video must be
explicitely muted.
closesodoo/odoo#34323
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Fix a bug that can be reproduced like so:
- Insert list
- Type char
- ENTER
- TAB
- Type char
The character gets inserted _after_ the `br` instead of replacing it.
closesodoo/odoo#34805
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
The optimize modal was adding images to the modal even when closing
without optimizing the image.
Now when we close the modal, no images is append to it, same if we
click on "Keep Original" while optimizing an already existing image.
Part of #33983
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The wysiwyg.widgets.image.existing template was not used and
reintroduced in a refactoring. It is now gone as it should be.
Commit where the template is removed with its only usage:
(in editor.xml as web_editor.dialog.image.existing)
78a30d44cf
Commit where the template is reappearing refactored but not used:
f296992317
Part of #33983
The div that is replaced with the existing.attachments template was not
the right target and kept nesting div into each other.
The parent div of the existing.attachments now has the
o_we_existing_attachments class (the target to be replaced by itself).
Part of #33983
Under certain unknown conditions, the range cannot be applied and
triggered an error. In order to allow the user to keep editing, we need
to prevent the dialog from showing, hence the use of `console.error`.
If this error appears, the carret is moved to the beginning of the focused
node.
If this error appears, then bullet can generate an error (I managed to
have the bug once or simulate it by manually breaking the dom and range)
closesodoo/odoo#34284
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The new editor of https://github.com/odoo/odoo/pull/29775 came with a
fullscreen option. When using the toggle when the editor is in inside
a modal, the editor stretched only to match the size of the modal
instead of the viewport.
This is because the 'position: fixed' rule which is used to achieve the
fullscreen layout cannot work if a parent of the element has a CSS
transform applied on it. Indeed in that case, that element acts like the
viewport for 'position: fixed' elements.
closesodoo/odoo#34272
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
On a chromium based browser. Install theme_treehouse, add the "Step"
widget. Double click on the FA-icon, error in log.
The parent element of `self.$media` does not have a `class` attribute,
accessing that attribute returns `undefined` and `cannot call match on
undefined` error.
closesodoo/odoo#34946
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Under certain unknown conditions, the range cannot be applied and
triggered an error. In order to allow the user to keep editing, we need
to prevent the dialog from showing, hence the use of `console.error`.
If this error appears, the carret is moved to the beginning of the focused
node.
If this error appears, then bullet can generate an error (I managed to
have the bug once or simulate it by manually breaking the dom and range)
closesodoo/odoo#34188
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Purpose
=======
Parentheses in the label of units of measure sometimes make
reading needlessly uncomfortable.
Specification
=============
Remove parentheses in the name of every standard uom.uom and hardcoded
occurence on views/field names.
TaskID: 2030444
closesodoo/odoo#34492
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Since 72f7139f52, config.debug does not exist anymore, config.isDebug()
should be used.
Two commits merged at the same time were still using config.debug, 87a35d4263
and 88a26235caCloses#33961
In order for the map view to work properly:
- I moved scss property to a file only scoped to website module.
- moved the definiton of "partner_latitude" and "partner_longitude" from
base_geolocalise to base/res.partner
closesodoo/odoo#32487
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
When we add a document with the "Select a Media" modal, if we reopen the
modal then click on "Save" without modfiying anything, the element is
broken since we do not have the data saying it is a document and the
code try to display it as image.
With this changeset, we keep the information that the attachment is a
document and when saving it works as expected.
opw-2004064
closes#33844
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
In a web editor, add some text, select the text, add a link and
immediately discard the link modal. Traceback.
The traceback is a execute `setEnd` on `Range`, that error is thrown
because editable DIV doesn't save old range
Odoo wrap code does some text node split in order to attach the link
just on the selected text. If it correctly re-set the underlying
structure, it does not update the $(editable) structure used to restore
ranges.
After this commit, editable div will use newly created range for the element
for ex:
-> content: test
-> selected content "test"
when click on link dialog:
ec: test , eo: 4, sc: test, so: 0
selected content -> start 0, end 4 -> "test" like this
after clicking on discard:
ec: null text element, eo: 4, sc: null text element, so: 0
selected content -> ec and sc both are null, so it will throw an error
while setting cursor position
after applying fix when click on discard:
ec: test, eo: 4, sc: test, so: 0
selected content -> start 0, end 4 -> "test"
task - 1955863
closesodoo/odoo#33692
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>