|
|
@ -1,4 +1,4 @@ |
|
|
|
/* © 2016 ACSONE SA/NV (<http://acsone.eu>) |
|
|
|
/* Copyright 2016 ACSONE SA/NV (<http://acsone.eu>) |
|
|
|
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
|
|
|
odoo.define('date_range.search_filters', function (require) { |
|
|
|
"use strict"; |
|
|
@ -44,7 +44,7 @@ filters.ExtendedSearchProposition.include({ |
|
|
|
|
|
|
|
date_range_type_operator_selected: function (type_id){ |
|
|
|
this.$value.empty().show(); |
|
|
|
var ds = new data.DataSetSearch(this, 'date.range', this.context, [['type_id', '=', parseInt(type_id)]]); |
|
|
|
var ds = new data.DataSetSearch(this, 'date.range', this.context, [['type_id', '=', parseInt(type_id, 10)]]); |
|
|
|
ds.read_slice(['name','date_start', 'date_end'], {}).done(this.proxy('on_range_type_selected')); |
|
|
|
|
|
|
|
}, |
|
|
@ -66,7 +66,7 @@ filters.ExtendedSearchProposition.include({ |
|
|
|
res.attrs.domain = this.value.domain; |
|
|
|
} |
|
|
|
return res; |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
@ -80,7 +80,7 @@ class |
|
|
|
filters.ExtendedSearchProposition.DateRange = core.search_filters_registry.get('id').extend({ |
|
|
|
template: 'SearchView.extended_search.dateRange.selection', |
|
|
|
events: { |
|
|
|
'change': 'on_range_selected', |
|
|
|
'change': 'on_range_selected' |
|
|
|
}, |
|
|
|
|
|
|
|
init: function (parent, field, date_range_values) { |
|
|
@ -95,7 +95,7 @@ filters.ExtendedSearchProposition.DateRange = core.search_filters_registry.get(' |
|
|
|
}, |
|
|
|
|
|
|
|
get_value: function () { |
|
|
|
return parseInt(this.$el.val()); |
|
|
|
return parseInt(this.$el.val(), 10); |
|
|
|
}, |
|
|
|
|
|
|
|
on_range_selected: function (e){ |
|
|
@ -108,7 +108,7 @@ filters.ExtendedSearchProposition.DateRange = core.search_filters_registry.get(' |
|
|
|
field_name: this.field.name |
|
|
|
}, |
|
|
|
model: 'date.range', |
|
|
|
method: 'get_domain', |
|
|
|
method: 'get_domain' |
|
|
|
}) |
|
|
|
.then(function (domain) { |
|
|
|
framework.unblockUI(); |
|
|
@ -118,7 +118,7 @@ filters.ExtendedSearchProposition.DateRange = core.search_filters_registry.get(' |
|
|
|
|
|
|
|
get_domain: function (field, operator) { |
|
|
|
return this.domain; |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|