Skip to content
Permalink
Browse files

pedro imp

  • Loading branch information...
fmdl committed Mar 23, 2019
1 parent c4ab100 commit fdda97999a0692860bbf2a5e16e1ea55ccc822e2
@@ -512,7 +512,9 @@ var FieldMany2One = AbstractField.extend({
context: context,
},
})
.then(self._searchCreatePopup.bind(self, "search"));
.then(function (result){
self._searchCreatePopup("search", result, {'search_default_limit_160':search_val || 'no_name_search_set_by_user'});
});
},
classname: 'o_m2o_dropdown_option',
});
@@ -565,7 +567,7 @@ var FieldMany2One = AbstractField.extend({
return new dialogs.SelectCreateDialog(this, _.extend({}, this.nodeOptions, {
res_model: this.field.relation,
domain: this.record.getDomain({fieldName: this.name}),
context: _.extend({}, this.record.getContext(this.recordParams), context || {}, {'search_default_limit_160':1}),
context: _.extend({}, this.record.getContext(this.recordParams), context || {}),
title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + this.string,
initial_ids: ids ? _.map(ids, function (x) { return x[0]; }) : undefined,
initial_view: view,
@@ -793,16 +793,23 @@ var SearchView = Widget.extend({
};
}

if (this.dataset.context.search_default_limit_160 === 1) {
if (this.dataset.context.search_default_limit_160) {
var msg
if (this.dataset.context.search_default_limit_160 === 'no_name_search_set_by_user'){
msg = _("Remove this Filter to see all result");
}
else{
msg = this.dataset.context.search_default_limit_160 + _t(" (First result only)");

}
filters.push({
"category": "filters",
"item": {
"attrs": {
"domain": [],
"isPeriod": false,
"name": "limit_160",
"string": _t("Remove this filter to see all result."),

"string": msg,
},
"children:": [],
"tag": "filter"

0 comments on commit fdda979

Please sign in to comment.
You can’t perform that action at this time.