[FIX] Should not print workflow in non standard views
bzr revid: jam@tinyerp.com-20120912131951-6virlw8v8a8mccov
This commit is contained in:
parent
ac2608d3dd
commit
14ed53e196
|
@ -837,8 +837,12 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
|||
});
|
||||
break;
|
||||
case 'print_workflow':
|
||||
var self = this
|
||||
if (current_view.get_selected_ids().length != 1) {
|
||||
var self = this;
|
||||
if (self.active_view !== "form" && self.active_view !== "list"){
|
||||
instance.web.dialog($("<div />").text(_t("Workflow can be printed from 'Form' or 'List' view only.")), { title: _t("Warning"), modal: true });
|
||||
evt.currentTarget.selectedIndex = 0;
|
||||
return false;
|
||||
}else if (current_view.get_selected_ids().length != 1) {
|
||||
instance.web.dialog($("<div />").text(_t("You must choose only one record.")), { title: _t("Warning"), modal: true });
|
||||
evt.currentTarget.selectedIndex = 0;
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue