summaryrefslogtreecommitdiff
path: root/addons/web_settings_dashboard/static/src
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-10-04 19:58:07 +0000
committerAlexandre Kühn <aku@odoo.com>2018-10-10 15:29:31 +0000
commit1f7e98dd9bb138ae94d294696f853c5b6ae3b4d2 (patch)
tree57d3bef20717730051eb1fe0d4faed00dfaa4ca7 /addons/web_settings_dashboard/static/src
parenta943d8a71214cdf289375f0318cd3d34e7dec3a0 (diff)
[FIX] web_settings_dashboard: set up your company
Before this commit, it was not possible to set up a company. This is caused by the clickable DOM element being a `<a>` with `href='#'`. This redirects to the 1st app in community (usually the 'Discuss' app), which prevents opening the form view to set up information about your company. This commit fixes the issue by preventing the browser to change the URL in the address bar when clicking on 'Set up'. Closes #27434 Closes #27442
Diffstat (limited to 'addons/web_settings_dashboard/static/src')
-rw-r--r--addons/web_settings_dashboard/static/src/js/dashboard.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/addons/web_settings_dashboard/static/src/js/dashboard.js b/addons/web_settings_dashboard/static/src/js/dashboard.js
index 2065769bdc0..85a2be3e8c5 100644
--- a/addons/web_settings_dashboard/static/src/js/dashboard.js
+++ b/addons/web_settings_dashboard/static/src/js/dashboard.js
@@ -371,7 +371,7 @@ var DashboardCompany = Widget.extend({
template: 'DashboardCompany',
events: {
- 'click .o_setup_company': 'on_setup_company'
+ 'click .o_setup_company': '_onSetupCompany'
},
init: function (parent, data) {
@@ -380,7 +380,16 @@ var DashboardCompany = Widget.extend({
this._super.apply(this, arguments);
},
- on_setup_company: function () {
+ //--------------------------------------------------------------------------
+ // Handlers
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * @param {MouseEvent} ev
+ */
+ _onSetupCompany: function (ev) {
+ ev.preventDefault();
var self = this;
var action = {
type: 'ir.actions.act_window',