Skip to content

Commit 126a09c

Browse files
sdegueldreqsm-odoo
authored andcommitted
[FIX] web_editor: fix media-dialog not showing most images
This was caused by trying to not show dynamic-svgs that had already been downloaded when the option to not allow the media-library was activated (eg in the website logo, we do not want to allow dynamic SVGs) Unfortunately the domain was doing a string comparison to make sure the url wasn't like the one from dynamic SVGs but implicitly required that the url field be not null. This commit fixes that by explicitly allowing images with a null url field. task-2466819 part of odoo#66732 closes odoo#67411 X-original-commit: 0784e14 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
1 parent 6c7476f commit 126a09c

File tree

1 file changed

+1
-1
lines changed
  • addons/web_editor/static/src/js/wysiwyg/widgets

1 file changed

+1
-1
lines changed

addons/web_editor/static/src/js/wysiwyg/widgets/media.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ var FileWidget = SearchableMediaWidget.extend({
295295
domain.push(['name', 'ilike', needle]);
296296
}
297297
if (!this.options.useMediaLibrary) {
298-
domain.push('!', ['url', '=ilike', '/web_editor/shape/%']);
298+
domain.push('|', ['url', '=', false], '!', ['url', '=ilike', '/web_editor/shape/%']);
299299
}
300300
domain.push('!', ['name', '=like', '%.crop']);
301301
domain.push('|', ['type', '=', 'binary'], '!', ['url', '=like', '/%/static/%']);

0 commit comments

Comments
 (0)