Merge pull request #83 from etenesaca/master

[IMP] When no result is displayed in m2o field with option "no_create", add a "No result" value to avoid confusion.
This commit is contained in:
Martin Trigaux 2014-05-27 09:28:15 +02:00
commit 4da882d48f
1 changed files with 6 additions and 0 deletions

View File

@ -3394,6 +3394,12 @@ instance.web.form.CompletionFieldMixin = {
classname: 'oe_m2o_dropdown_option'
});
}
else if (values.length == 0)
values.push({
label: _t("No results to show..."),
action: function() {},
classname: 'oe_m2o_dropdown_option'
});
return values;
});