[ADD] action.flags.default_view defines default view to switch on when viewmanager is created.
bzr revid: fme@openerp.com-20111212094152-26eto8s1k9wlhxne
This commit is contained in:
parent
d9bbf2f390
commit
17b76fdc7e
|
@ -234,8 +234,9 @@ session.web.ViewManager = session.web.Widget.extend(/** @lends session.web.View
|
||||||
if (this.flags.views_switcher === false) {
|
if (this.flags.views_switcher === false) {
|
||||||
this.$element.find('.oe_vm_switch').hide();
|
this.$element.find('.oe_vm_switch').hide();
|
||||||
}
|
}
|
||||||
// switch to the first one in sequence
|
// If no default view defined, switch to the first one in sequence
|
||||||
return this.on_mode_switch(this.views_src[0].view_type);
|
var default_view = this.flags.default_view || this.views_src[0].view_type;
|
||||||
|
return this.on_mode_switch(default_view);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Asks the view manager to switch visualization mode.
|
* Asks the view manager to switch visualization mode.
|
||||||
|
|
Loading…
Reference in New Issue