diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 89b8cc1a38f..7c2b938c836 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -512,6 +512,7 @@ opacity: 0.5; } .openerp .oe_leftbar { + display: none; width: 220px; background: #f0eeee; border-right: 1px solid #afafb6; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index e013009f9b1..9f2a8605875 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -430,6 +430,7 @@ $colour4: #8a89ba // }}} // Webclient.leftbar {{{ .oe_leftbar + display: none width: 220px background: #f0eeee border-right: 1px solid #afafb6 diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 360131fd596..e5cb5d34593 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2316,9 +2316,11 @@ instance.web.form.CompletionFieldMixin = { var self = this; var dataset = new instance.web.DataSet(this, this.field.relation, self.build_context()); + var blacklist = this.get_search_blacklist(); return this.orderer.add(dataset.name_search( - search_val, self.build_domain(), 'ilike', this.limit + 1)).pipe(function(data) { + search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]), + 'ilike', this.limit + 1)).pipe(function(data) { self.last_search = data; // possible selections for the m2o var values = _.map(data, function(x) { @@ -2356,6 +2358,9 @@ instance.web.form.CompletionFieldMixin = { return values; }); }, + get_search_blacklist: function() { + return []; + }, _quick_create: function(name) { var self = this; var slow_create = function () { @@ -3180,6 +3185,9 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(_. var tmp = [commands.replace_with(this.get("value"))]; return tmp; }, + get_search_blacklist: function() { + return this.get("value"); + }, render_value: function() { var self = this; var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.view.dataset.get_context());