[IMP] Kanan quick create action should also repect the create tag on view

bzr revid: jam@tinyerp.com-20120816102758-2swimfa9dxu3uotv
This commit is contained in:
Jigar Amin - OpenERP 2012-08-16 15:57:58 +05:30
parent cf464eb273
commit 4c9205ff4a
2 changed files with 7 additions and 2 deletions

View File

@ -514,7 +514,12 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({
self.view.dataset.ids.push(id);
self.do_add_records(records, true);
});
}
},
_is_action_enabled: function(action) {
if (_.has(this.fields_view.arch.attrs, action))
return JSON.parse(this.fields_view.arch.attrs[action]);
return true;
}
});
instance.web_kanban.KanbanRecord = instance.web.Widget.extend({

View File

@ -25,7 +25,7 @@
<td class="oe_kanban_group_header">
<t t-if="widget.view.group_by">
<div class="oe_kanban_header">
<t t-if="widget.view._is_quick_create_enabled()">
<t t-if="widget.view._is_quick_create_enabled() and widget.view._is_action_enabled('create')">
<div class="oe_kanban_add oe_e">]</div>
</t>
<div class="oe_fold_column">