[FIX]Fixed code for consider view mode attrs as first priority.
lp bug: https://launchpad.net/bugs/885996 fixed bzr revid: kch@tinyerp.com-20111110094303-s63381get48xrn2u
This commit is contained in:
@@ -221,6 +221,15 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
|
||||
var self = this;
|
||||
var action_orig = _.extend({}, result.result);
|
||||
var action = result.result;
|
||||
var view_mode = this.actions_attrs[action.id]['view_mode'];
|
||||
if(view_mode) {
|
||||
action.views = _.map(view_mode.split(','), function(mode){
|
||||
mode = mode === 'tree' ? 'list': mode;
|
||||
return _.find(action.views, function(view) {
|
||||
return view[1] == mode;
|
||||
});
|
||||
});
|
||||
}
|
||||
action.flags = {
|
||||
search_view : false,
|
||||
sidebar : false,
|
||||
|
||||
Reference in New Issue
Block a user