From a9366de8f90ea4106d306c585043a42f089c86d4 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 20 Jun 2018 16:25:04 +0200 Subject: [PATCH] [FIX] web_editor: do not show cropped images in media dialog Cropped image attachment were not meant to appear in the media dialog, only original ones. --- addons/web_editor/static/src/js/widgets/widgets.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index ec747badabb..e04b02ade6f 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -363,6 +363,7 @@ var ImageWidget = MediaWidget.extend({ if (needle && needle.length) { domain.push('|', ['datas_fname', 'ilike', needle], ['name', 'ilike', needle]); } + domain.push('!', ['datas_fname', '=like', '%.crop'], '!', ['name', '=like', '%.crop']); return this._rpc({ model: 'ir.attachment', method: 'search_read',