summaryrefslogtreecommitdiff
path: root/addons/base/static
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2011-07-15 09:53:28 +0200
committerXavier Morel <xmo@openerp.com>2011-07-15 09:53:28 +0200
commit4f5f4e537cdf3fc1fe0793f66e72d8cb6aaa1fb1 (patch)
tree68e83aadc9f683f38fa1bbc9cc76763c5fe940b9 /addons/base/static
parent8b7470bdb90f3eb170b3f5a0bb9765958859ad27 (diff)
[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
Diffstat (limited to 'addons/base/static')
-rw-r--r--addons/base/static/src/js/search.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/base/static/src/js/search.js b/addons/base/static/src/js/search.js
index d8b33e3d9a6..7490fc4b800 100644
--- a/addons/base/static/src/js/search.js
+++ b/addons/base/static/src/js/search.js
@@ -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;