mirror of https://github.com/OCA/web.git
[IMP] web_advanced_search: contains search
parent
f86b57622f
commit
22efa5bc9b
|
@ -5,7 +5,7 @@
|
|||
|
||||
{
|
||||
"name": "Advanced search",
|
||||
"version": "12.0.1.0.0",
|
||||
"version": "12.0.1.0.1",
|
||||
"author": "Therp BV, "
|
||||
"Tecnativa, "
|
||||
"Odoo Community Association (OCA)",
|
||||
|
|
|
@ -4,3 +4,4 @@
|
|||
* Rami Alwafaie <rami.alwafaie@initos.com>
|
||||
* Jose Mª Bernet <josemaria.bernet@guadaltech.es>
|
||||
* Simone Orsi <simone.orsi@camptocamp.com>
|
||||
* Dennis Sluijk <d.sluijk@onestein.nl>
|
||||
|
|
|
@ -279,6 +279,7 @@ odoo.define("web_advanced_search", function (require) {
|
|||
* @override
|
||||
*/
|
||||
_applyChanges: function (dataPointID, changes, event) {
|
||||
if (this._field_widget_name === 'many2one') {
|
||||
// Make char updates look like valid x2one updates
|
||||
if (_.isNaN(changes[this.field.name].id)) {
|
||||
changes[this.field.name] = {
|
||||
|
@ -287,6 +288,9 @@ odoo.define("web_advanced_search", function (require) {
|
|||
};
|
||||
}
|
||||
return FieldManagerMixin._applyChanges.apply(this, arguments);
|
||||
}
|
||||
|
||||
return $.Deferred().resolve();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -306,7 +310,7 @@ odoo.define("web_advanced_search", function (require) {
|
|||
case "many2one":
|
||||
return this._field_widget.value.res_id;
|
||||
default:
|
||||
return this._field_widget.value.data.display_name;
|
||||
return this._field_widget.$el.val();
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.name === "TypeError") {
|
||||
|
@ -325,6 +329,8 @@ odoo.define("web_advanced_search", function (require) {
|
|||
switch (this._field_widget_name) {
|
||||
case "many2one":
|
||||
return this._field_widget.value.data.display_name;
|
||||
default:
|
||||
return this._field_widget.$el.val();
|
||||
}
|
||||
return this._super.apply(this, arguments);
|
||||
} catch (error) {
|
||||
|
|
Loading…
Reference in New Issue