[FIX] board: hide the "Add To Dashboard" option in search views when current action is incompatible (e.g. client actions don't work in dashboards at the moment)

lp bug: https://launchpad.net/bugs/1157896 fixed

bzr revid: odo@openerp.com-20130321114605-2ddj46q2pkswm36b
This commit is contained in:
Olivier Dony 2013-03-21 12:46:05 +01:00
parent 94814833d4
commit 4c75931f6c
1 changed files with 4 additions and 2 deletions

View File

@ -419,8 +419,10 @@ instance.board.AddToDashboard = instance.web.search.Input.extend({
instance.web.SearchView.include({
add_common_inputs: function() {
this._super();
(new instance.board.AddToDashboard(this));
var vm = this.getParent().getParent();
if (vm.inner_action && vm.inner_action.views) {
(new instance.board.AddToDashboard(this));
}
}
});