[FIX] Can't add to dashboard a view that includes a 'group_by'

lp bug: https://launchpad.net/bugs/948097 fixed

bzr revid: fme@openerp.com-20120306205955-zqgtbgtz1gtix4w9
This commit is contained in:
Fabien Meghazi 2012-03-06 21:59:55 +01:00
parent 0093da0d5b
commit 34b03bd24d
2 changed files with 4 additions and 1 deletions

View File

@ -1359,7 +1359,7 @@ class SearchView(View):
if board and 'arch' in board:
xml = ElementTree.fromstring(board['arch'])
column = xml.find('./board/column')
if column:
if column is not None:
new_action = ElementTree.Element('action', {
'name' : str(action_id),
'string' : name,

View File

@ -408,6 +408,9 @@ session.web.ViewManager = session.web.OldWidget.extend(/** @lends session.web.V
var groupby = results.group_by.length
? results.group_by
: action_context.group_by;
if (_.isString(groupby)) {
groupby = [groupby];
}
controller.do_search(results.domain, results.context, groupby || []);
});
},