[FIX] when switching between actions like a madman, there seem to be cases when a search view *should* be ready (on_loaded has finished executing) yet not all widgets are fully rendered (has only happened on the Date one so far, YMMV)
just raise an invalid search error instead of blowing up, I can't find what the actual problem is for now lp bug: https://launchpad.net/bugs/805861 fixed bzr revid: xmo@openerp.com-20110715075328-0lfwvnoul9atv2tc
This commit is contained in:
parent
8b7470bdb9
commit
4f5f4e537c
|
@ -663,6 +663,10 @@ openerp.base.search.DateField = openerp.base.search.Field.extend(
|
|||
get_values: function () {
|
||||
var values_array = this.$element.find('input').serializeArray();
|
||||
|
||||
if (!values_array || !values_array[0]) {
|
||||
throw new openerp.base.search.Invalid(
|
||||
this.attrs.name, null, "widget not ready");
|
||||
}
|
||||
var from = values_array[0].value;
|
||||
var to = values_array[1].value;
|
||||
|
||||
|
|
Loading…
Reference in New Issue