[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.
This commit is contained in:
qsm-odoo
2018-06-21 12:58:03 +02:00
parent bf64efb5a0
commit a9366de8f9
@@ -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',