From 2dd7c07fd8bb767fef4cb3a8875d640899ba1c03 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Tue, 12 May 2015 16:08:57 +0200 Subject: [PATCH] [FIX] web,account: add support to have possibility to click on a link of type action in help message and fix account dashboard help message --- addons/account/views/account_journal_dashboard_view.xml | 3 ++- addons/web/static/src/js/framework/view.js | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml index c1b6249e086..bbb0f0e885e 100644 --- a/addons/account/views/account_journal_dashboard_view.xml +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -305,7 +305,8 @@ []

- To track activities in your bank accounts and analyse your sales and purchase journals, install the chart of account matching your country or configure the custom chart of accounts. + This Dashboard helps you manage your accounting. + If you have not yet installed a chart of account, please install one first.

diff --git a/addons/web/static/src/js/framework/view.js b/addons/web/static/src/js/framework/view.js index 4c28474eaa4..f8791c6bf4f 100644 --- a/addons/web/static/src/js/framework/view.js +++ b/addons/web/static/src/js/framework/view.js @@ -7,6 +7,13 @@ var pyeval = require('web.pyeval'); var Widget = require('web.Widget'); var View = Widget.extend({ + events: { + 'click a[type=action]': function (ev) { + ev.preventDefault(); + var action_data = $(ev.target).attr('name'); + this.do_action(action_data); + } + }, // name displayed in view switchers display_name: '', /**