Merge pull request #4110 from mbauskar/minor-fixes
[minor] don't show Bulk Print Option if user don't have Print permission
This commit is contained in:
commit
fca4ced23e
2 changed files with 7 additions and 2 deletions
|
|
@ -47,6 +47,9 @@ frappe.views.ListRenderer = Class.extend({
|
|||
},
|
||||
init_settings: function () {
|
||||
this.settings = frappe.listview_settings[this.doctype] || {};
|
||||
if(!("selectable" in this.settings)) {
|
||||
this.settings.selectable = true;
|
||||
}
|
||||
this.init_user_settings();
|
||||
|
||||
this.order_by = this.user_settings.order_by || this.settings.order_by;
|
||||
|
|
|
|||
|
|
@ -620,7 +620,9 @@ frappe.views.ListView = frappe.ui.BaseList.extend({
|
|||
}
|
||||
|
||||
this.make_bulk_assignment();
|
||||
this.make_bulk_printing();
|
||||
if(frappe.model.can_print(this.doctype)) {
|
||||
this.make_bulk_printing();
|
||||
}
|
||||
|
||||
// add to desktop
|
||||
this.page.add_menu_item(__('Add to Desktop'), function () {
|
||||
|
|
@ -777,7 +779,7 @@ frappe.views.ListView = frappe.ui.BaseList.extend({
|
|||
|
||||
setup_delete: function () {
|
||||
var me = this;
|
||||
if (!(this.can_delete || this.list_renderer.settings.selectable)) {
|
||||
if (!this.can_delete) {
|
||||
return;
|
||||
}
|
||||
this.$page.on('change', '.list-row-checkbox, .list-select-all', function() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue