diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js index 761876929da..8b8d34c6368 100644 --- a/addons/web_dashboard/static/src/js/dashboard.js +++ b/addons/web_dashboard/static/src/js/dashboard.js @@ -231,6 +231,15 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({ } }, renderElement: function() { + var self = this; + //to Check dash contains any action if not then show the action help + var array= []; + _.each(this.node.children, function(column, column_index) { + array.push(_.include(_.pluck(column.children,"tag"),"action")); + }); + if (! _.include(array,true)){ + return self.no_result(); + } // We should start with three columns available for (var i = this.node.children.length; i < 3; i++) { this.node.children.push({ @@ -242,6 +251,17 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({ var rendered = QWeb.render(this.form_template, this); this.$element.html(rendered); }, + no_result: function () { + if (!this.view.options.action + || !this.view.options.action.help) { + return; + } + this.$element.prepend( + $('