[MERGE] Merged with main web.

bzr revid: tde@openerp.com-20120531083135-uaz2127ns74fua8h
This commit is contained in:
Thibault Delavallée
2012-05-31 10:31:35 +02:00
3 changed files with 11 additions and 1 deletions
+1
View File
@@ -512,6 +512,7 @@
opacity: 0.5;
}
.openerp .oe_leftbar {
display: none;
width: 220px;
background: #f0eeee;
border-right: 1px solid #afafb6;
+1
View File
@@ -430,6 +430,7 @@ $colour4: #8a89ba
// }}}
// Webclient.leftbar {{{
.oe_leftbar
display: none
width: 220px
background: #f0eeee
border-right: 1px solid #afafb6
+9 -1
View File
@@ -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());