diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 01f5d21511f..89b8cc1a38f 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1633,7 +1633,7 @@ -webkit-border-radius: 3px; border-radius: 3px; background: white; - min-width: 90px; + min-width: 70px; color: #1f1f1f; } .openerp .oe_form input[readonly], @@ -1672,8 +1672,6 @@ .openerp .oe_form .oe_form_field_url button img { vertical-align: top; } -.openerp .oe_form .oe_form_field_translatable, -.openerp .oe_form .oe_form_field_many2one, .openerp .oe_form .oe_form_field_date, .openerp .oe_form .oe_form_field_datetime { white-space: nowrap; @@ -1790,8 +1788,9 @@ } .openerp .oe_horizontal_separator { font-weight: bold; - font-size: 16px; - margin: 4px 0; + font-size: 20px; + margin: 20px 0px 10px 0px; + color: #aaaabb; } .openerp .oe_horizontal_separator:empty { height: 5px; @@ -1868,7 +1867,7 @@ -webkit-border-radius: 3px; border-radius: 3px; background: white; - min-width: 90px; + min-width: 50px; } .openerp .oe_form .oe_form_field_progressbar.ui-progressbar span { position: absolute; @@ -1982,8 +1981,10 @@ .openerp .oe-listview-content > tbody > tr { border-top: 1px solid #dddddd; } -.openerp .oe-listview-content > tbody > tr > td, .openerp .oe-listview-content > tbody > tr > th { +.openerp .oe-listview-content > tbody > tr > td.oe-field-cell { padding: 3px 6px; +} +.openerp .oe-listview-content > tbody > tr > td, .openerp .oe-listview-content > tbody > tr > th { line-height: 18px; } .openerp .oe-listview-content > tbody > tr > td > button, .openerp .oe-listview-content > tbody > tr > th > button { diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 95571ee7caf..e013009f9b1 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1329,13 +1329,13 @@ $colour4: #8a89ba -webkit-border-radius: 3px border-radius: 3px background: white - min-width: 90px + min-width: 70px color: #1f1f1f input[readonly], select[readonly], textarea[readonly], input[disabled], - select[disabled], + select[disabled] background: #E5E5E5 !important color: #666 textarea[disabled] @@ -1359,8 +1359,6 @@ $colour4: #8a89ba .oe_form_field_email button img, .oe_form_field_url button img vertical-align: top - .oe_form_field_translatable, - .oe_form_field_many2one, .oe_form_field_date, .oe_form_field_datetime white-space: nowrap @@ -1471,8 +1469,9 @@ $colour4: #8a89ba border-bottom: 1px solid black .oe_horizontal_separator font-weight: bold - font-size: 16px - margin: 4px 0 + font-size: 20px + margin: 20px 0px 10px 0px + color: #aab .oe_horizontal_separator:empty height: 5px .oe_vertical_separator @@ -1538,7 +1537,7 @@ $colour4: #8a89ba -webkit-border-radius: 3px border-radius: 3px background: white - min-width: 90px + min-width: 50px span position: absolute @@ -1642,8 +1641,9 @@ $colour4: #8a89ba background: white > tr border-top: 1px solid #ddd - > td, > th + > td.oe-field-cell padding: 3px 6px + > td, > th line-height: 18px > button border: none diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 5a04b636622..ca1d576a8e5 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -673,7 +673,7 @@ instance.web.FormView = instance.web.View.extend(_.extend({}, instance.web.form. var msg = ""; @@ -937,7 +937,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt } var obj = self.fields_registry.get_any([$elem.attr('widget'), self.fvg.fields[name].type]); if (!obj) { - throw new Error("Widget type '"+ key + "' is not implemented"); + throw new Error("Widget type '"+ $elem.attr('widget') + "' is not implemented"); } var w = new (obj)(self.view, instance.web.xml_to_json($elem[0])); var $label = self.labels[$elem.attr("name")]; @@ -2317,9 +2317,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) { @@ -2357,6 +2359,9 @@ instance.web.form.CompletionFieldMixin = { return values; }); }, + get_search_blacklist: function() { + return []; + }, _quick_create: function(name) { var self = this; var slow_create = function () { @@ -3181,6 +3186,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());