The search view tries to evaluate the category of a filter in order
to put it in the filters or in the group by sub menu. The pyeval.eval
function could throw an exception, which is not cool if it crashes the
client. This fix make sure that the exception is caught.
function eval_item (item) {
var category = 'filters';
if (item.attrs.context) {
- var context = instance.web.pyeval.eval('context', item.attrs.context);
- if (context.group_by) {
- category = 'group_by';
- }
+ try {
+ var context = instance.web.pyeval.eval('context', item.attrs.context);
+ if (context.group_by) {
+ category = 'group_by';
+ }
+ } catch (e) {}
}
return {
item: item,