|
@ -9,7 +9,6 @@ odoo.define('date_range.search_filters', function (require) { |
|
|
var rpc = require('web.rpc'); |
|
|
var rpc = require('web.rpc'); |
|
|
var framework = require('web.framework'); |
|
|
var framework = require('web.framework'); |
|
|
|
|
|
|
|
|
var _t = core._t; |
|
|
|
|
|
filters.ExtendedSearchProposition.include({ |
|
|
filters.ExtendedSearchProposition.include({ |
|
|
select_field: function (field) { |
|
|
select_field: function (field) { |
|
|
this._super.apply(this, arguments); |
|
|
this._super.apply(this, arguments); |
|
@ -66,7 +65,7 @@ odoo.define('date_range.search_filters', function (require) { |
|
|
res.attrs.domain = this.value.domain; |
|
|
res.attrs.domain = this.value.domain; |
|
|
} |
|
|
} |
|
|
return res; |
|
|
return res; |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -80,7 +79,7 @@ class |
|
|
filters.ExtendedSearchProposition.DateRange = core.search_filters_registry.get('id').extend({ |
|
|
filters.ExtendedSearchProposition.DateRange = core.search_filters_registry.get('id').extend({ |
|
|
template: 'SearchView.extended_search.dateRange.selection', |
|
|
template: 'SearchView.extended_search.dateRange.selection', |
|
|
events: { |
|
|
events: { |
|
|
'change': 'on_range_selected' |
|
|
|
|
|
|
|
|
'change': 'on_range_selected', |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
init: function (parent, field, date_range_values) { |
|
|
init: function (parent, field, date_range_values) { |
|
@ -105,10 +104,10 @@ class |
|
|
return rpc.query({ |
|
|
return rpc.query({ |
|
|
args: [this.get_value()], |
|
|
args: [this.get_value()], |
|
|
kwargs: { |
|
|
kwargs: { |
|
|
field_name: this.field.name |
|
|
|
|
|
|
|
|
field_name: this.field.name, |
|
|
}, |
|
|
}, |
|
|
model: 'date.range', |
|
|
model: 'date.range', |
|
|
method: 'get_domain' |
|
|
|
|
|
|
|
|
method: 'get_domain', |
|
|
}) |
|
|
}) |
|
|
.then(function (domain) { |
|
|
.then(function (domain) { |
|
|
framework.unblockUI(); |
|
|
framework.unblockUI(); |
|
@ -118,7 +117,7 @@ class |
|
|
|
|
|
|
|
|
get_domain: function (field, operator) { |
|
|
get_domain: function (field, operator) { |
|
|
return this.domain; |
|
|
return this.domain; |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|