From ff65067f1dd2c63766d419029d44f10215e5115e Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 21 Jun 2012 11:52:03 +0200 Subject: [PATCH] [FIX] actually clear basic textual fields in search view when [Clear] button used, don't just reset to default value lp bug: https://launchpad.net/bugs/1015612 fixed bzr revid: xmo@openerp.com-20120621095203-oruw1ghlxu2gc7qh --- addons/web/static/src/js/search.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 13530ae3f89..d35a5ab6217 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -822,6 +822,16 @@ openerp.web.search.Field = openerp.web.search.Input.extend( /** @lends openerp.w val); } return _.extend({}, domain, {own_values: {self: val}}); + }, + clear: function () { + if (!this.$element.val()) { + return; + } + var self = this; + setTimeout(function () { + self.$element.val(''); + }, 0); + } }); /**