diff options
| author | Olivier Dony <odo@openerp.com> | 2012-02-09 15:13:39 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2012-02-09 15:13:39 +0100 |
| commit | affdaf2566a190bd0235878ff978f5cf0fc56ff7 (patch) | |
| tree | fe24d008e82405e6c35737c3bc0804ab5889fee2 /addons/web_dashboard/static/src | |
| parent | af15e1d83e55dd6c7f96654e2eff5310c756207c (diff) | |
[FIX] Application Tiles now heed the custom menu domain, just like the nain menu
This makes both behaviors consistent
and allows the portal module to work
properly.
bzr revid: odo@openerp.com-20120209141339-c2vs0lrx7ws6plzs
Diffstat (limited to 'addons/web_dashboard/static/src')
| -rw-r--r-- | addons/web_dashboard/static/src/js/dashboard.js | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js index b8cdaf768ad..2babbda1716 100644 --- a/addons/web_dashboard/static/src/js/dashboard.js +++ b/addons/web_dashboard/static/src/js/dashboard.js @@ -419,18 +419,14 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.OldWidget.extend({ }, on_installed_database: function() { var self = this; - var ds = new openerp.web.DataSetSearch(this, 'ir.ui.menu', null, [['parent_id', '=', false]]); - var r = ds.read_slice( ['name', 'web_icon_data', 'web_icon_hover_data', 'module']).then(function (applications) { - //// Create a matrix of 3*x applications - //var rows = []; - //while (applications.length) { - // rows.push(applications.splice(0, 3)); - //} - //var tiles = QWeb.render('ApplicationTiles.content', {rows: rows}); - var tiles = QWeb.render('ApplicationTiles.content', {applications: applications}); - $(tiles).appendTo(self.$element).find('.oe_install-module-link').click(function () { - openerp.webclient.menu.on_menu_click(null, $(this).data('menu')) - }); + self.rpc('/web/menu/get_user_roots', {}).then(function (menu_ids) { + var menuds = new openerp.web.DataSet(this, 'ir.ui.menu',{}) + .read_ids(menu_ids, ['name', 'web_icon_data', 'web_icon_hover_data', 'module']).then(function (applications) { + var tiles = QWeb.render('ApplicationTiles.content', {applications: applications}); + $(tiles).appendTo(self.$element).find('.oe_install-module-link').click(function () { + openerp.webclient.menu.on_menu_click(null, $(this).data('menu')) + }); + }); }); } }); |
