--- /dev/null
+openerp.base_default_home = function (openerp) {
+ QWeb.add_template('/base_default_home/static/src/xml/base_default_home.xml');
+
+ var old_home = openerp.base.WebClient.prototype.default_home;
+
+ openerp.base_default_home = {
+ applications: [[
+ 'sales',
+ 'purchases',
+ 'warehouse',
+ 'manufacturing'
+ ], [
+ 'project',
+ 'accounting',
+ 'human resources',
+ 'marketing'
+ ], [
+ 'knowledge',
+ 'point of sale',
+ 'tools',
+ 'administration'
+ ]
+ ]
+ };
+
+ openerp.base.WebClient.prototype.default_home = function () {
+ var self = this;
+ var Installer = new openerp.base.DataSet(
+ this.session, 'base.setup.installer');
+ Installer.call('already_installed', [], function (installed_modules) {
+ if (!_(installed_modules).isEmpty()) {
+ return old_home.call(self);
+ }
+ self.$element.find('.oe-application').html(
+ QWeb.render('HomeInstallerTiles', {
+ rows: openerp.base_default_home.applications
+ }));
+ });
+ }
+};
--- /dev/null
+<template>
+ <div t-name="HomeInstallerTiles" class="oe-dashboard-home-tiles">
+ <table width="100%">
+ <tr t-foreach="rows" t-as="row">
+ <td t-foreach="row" t-as="application" width="25%">
+ <div class="oe-dashboard-home-tile"
+ t-att-data-menuid="application">
+ <div class="oe-dashboard-home-tile-icon">
+ <img t-att-src="'/base_default_home/static/src/img/' + application.replace(new RegExp('\\s', 'g'), '-') + '.png'"/>
+ </div>
+ <span><t t-esc="application"/></span>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+</template>