projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9bbf2f
)
[ADD] action.flags.default_view defines default view to switch on when viewmanager...
author
Fabien Meghazi
<fme@openerp.com>
Mon, 12 Dec 2011 09:41:52 +0000
(10:41 +0100)
committer
Fabien Meghazi
<fme@openerp.com>
Mon, 12 Dec 2011 09:41:52 +0000
(10:41 +0100)
bzr revid: fme@openerp.com-
20111212094152
-26eto8s1k9wlhxne
addons/web/static/src/js/views.js
patch
|
blob
|
history
diff --git
a/addons/web/static/src/js/views.js
b/addons/web/static/src/js/views.js
index
e11c0c2
..
d57f9d4
100644
(file)
--- a/
addons/web/static/src/js/views.js
+++ b/
addons/web/static/src/js/views.js
@@
-234,8
+234,9
@@
session.web.ViewManager = session.web.Widget.extend(/** @lends session.web.View
if (this.flags.views_switcher === false) {
this.$element.find('.oe_vm_switch').hide();
}
- // switch to the first one in sequence
- return this.on_mode_switch(this.views_src[0].view_type);
+ // If no default view defined, switch to the first one in sequence
+ 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.