summaryrefslogtreecommitdiff
path: root/addons/web_dashboard/static/src
diff options
context:
space:
mode:
authorJiten (OpenERP) <jra@tinyerp.com>2011-11-22 10:48:03 +0530
committerJiten (OpenERP) <jra@tinyerp.com>2011-11-22 10:48:03 +0530
commit990ece97a5dfd2b22be25d73193452c034424cdb (patch)
treed0ebc692ed7d608d0cf4a79a5506e48e85ee4c9b /addons/web_dashboard/static/src
parentaad7d22763beb1774218bd7f041a918a56237964 (diff)
parent8ca42daf0a1b0ef3505a0505328a9d785ecb564c (diff)
[MERGE] Merge from openerp-web.
bzr revid: jra@tinyerp.com-20111122051803-1ttx64ilabhxo4p1
Diffstat (limited to 'addons/web_dashboard/static/src')
-rw-r--r--addons/web_dashboard/static/src/js/dashboard.js37
-rw-r--r--addons/web_dashboard/static/src/xml/web_dashboard.xml2
2 files changed, 34 insertions, 5 deletions
diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js
index 52e1175065e..6d0a9e1c747 100644
--- a/addons/web_dashboard/static/src/js/dashboard.js
+++ b/addons/web_dashboard/static/src/js/dashboard.js
@@ -218,9 +218,35 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
});
},
on_load_action: function(result) {
- var self = this;
- var action_orig = _.extend({}, result.result);
- var action = result.result;
+ var self = this,
+ action = result.result,
+ action_attrs = this.actions_attrs[action.id],
+ view_mode = action_attrs.view_mode;
+
+ // TODO: Use xmo's python evaluator when ready
+ if (action_attrs.context) {
+ action.context = _.extend(action.context || {}, action_attrs.context);
+ }
+ if (action_attrs.domain) {
+ action.domain = action.domain || [];
+ action.domain.push.apply(action.domain, action_attrs.domain);
+ }
+ var action_orig = _.extend({}, action);
+
+ if (view_mode && view_mode != action.view_mode) {
+ var action_view_mode = action.view_mode.split(',');
+ action.views = _.map(view_mode.split(','), function(mode) {
+ if (_.indexOf(action_view_mode, mode) < 0) {
+ return [false, mode == 'tree' ? 'list': mode];
+ } else {
+ mode = mode === 'tree' ? 'list' : mode;
+ return _.find(action.views, function(view) {
+ return view[1] == mode;
+ });
+ }
+ });
+ }
+
action.flags = {
search_view : false,
sidebar : false,
@@ -228,7 +254,10 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
action_buttons : false,
pager: false,
low_profile: true,
- display_title: false
+ display_title: false,
+ list: {
+ selectable: false
+ }
};
var am = new openerp.web.ActionManager(this);
this.action_managers.push(am);
diff --git a/addons/web_dashboard/static/src/xml/web_dashboard.xml b/addons/web_dashboard/static/src/xml/web_dashboard.xml
index 77eab4b7e28..72f418ebbad 100644
--- a/addons/web_dashboard/static/src/xml/web_dashboard.xml
+++ b/addons/web_dashboard/static/src/xml/web_dashboard.xml
@@ -116,7 +116,7 @@
<h1>Welcome to your new OpenERP instance.</h1>
<div class="oe-static-home-banner">
<li>Remember to bookmark this page.</li>
- <li>Remember your login: <i><t t-esc="session.login"/></i></li>
+ <li>Remember your login: <t t-esc="session.username"/></li>
<li>Choose the first OpenERP Application you want to install..</li>
</div>
<div class="oe-static-home-tiles">