3
0
Fork 0

[13.0][IMP] web_m2x_options

This is a forward port of

* https://github.com/OCA/web/pull/651
13.0
Thierry Ducrest 2020-12-14 08:58:45 +01:00
parent 21eee65a4e
commit ee1e795a00
1 changed files with 51 additions and 49 deletions

View File

@ -235,9 +235,12 @@ odoo.define("web_m2x_options.web_m2x_options", function(require) {
self.ir_options["web_m2x_options.search_more"] self.ir_options["web_m2x_options.search_more"]
); );
if (values.length > self.limit) { if (
(values.length > self.limit &&
(can_search_more || search_more_undef)) ||
search_more
) {
values = values.slice(0, self.limit); values = values.slice(0, self.limit);
if (can_search_more || search_more_undef || search_more) {
values.push({ values.push({
label: _t("Search More..."), label: _t("Search More..."),
action: function() { action: function() {
@ -286,7 +289,6 @@ odoo.define("web_m2x_options.web_m2x_options", function(require) {
classname: "o_m2o_dropdown_option", classname: "o_m2o_dropdown_option",
}); });
} }
}
var create_enabled = self.can_create && !self.nodeOptions.no_create; var create_enabled = self.can_create && !self.nodeOptions.no_create;
// Quick create // Quick create