[FIX] search view: slightly more readable error when search filters fail to evaluate
Prints the error details instead of: Uncaught TypeError: Cannot read property 'length' of undefined' addons/web/static/src/js/views.js bzr revid: odo@openerp.com-20140212141346-hpw05sv3ctr243db
This commit is contained in:
parent
b878c2e3ab
commit
2223ba5600
|
@ -815,6 +815,11 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
contexts: [action_context].concat(contexts || []),
|
||||
group_by_seq: groupbys || []
|
||||
}).done(function (results) {
|
||||
if (results.error) {
|
||||
throw new Error(
|
||||
_.str.sprintf(_t("Failed to evaluate search criterions")+": \n%s",
|
||||
JSON.stringify(results.error)));
|
||||
}
|
||||
self.dataset._model = new instance.web.Model(
|
||||
self.dataset.model, results.context, results.domain);
|
||||
var groupby = results.group_by.length
|
||||
|
|
Loading…
Reference in New Issue