[IMP] Kanban type action edit and delete on edit and delete falase

bzr revid: jam@tinyerp.com-20120820122020-8tszb43bivfgq72v
This commit is contained in:
Jigar Amin - OpenERP 2012-08-20 17:50:20 +05:30
parent 0f364e1acd
commit c1b7de054c
1 changed files with 3 additions and 1 deletions

View File

@ -734,7 +734,9 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({
var $action = $(this),
type = $action.data('type') || 'button',
method = 'do_action_' + (type === 'action' ? 'object' : type);
if (_.str.startsWith(type, 'switch_')) {
if ((type === 'edit' || type === 'delete') && ! self.view._is_action_enabled(type)){
self.view.open_record(self.id);
} else if (_.str.startsWith(type, 'switch_')) {
self.view.do_switch_view(type.substr(7));
} else if (typeof self[method] === 'function') {
self[method]($action);