From 2c8ce5a717ab48b3060402b464dc5fd7bcbda50a Mon Sep 17 00:00:00 2001 From: Vinayak Jethe Date: Wed, 24 Jan 2018 13:51:26 +0530 Subject: [PATCH] Fixes issue #12512 --- erpnext/stock/dashboard/item_dashboard.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js index 3c334c46b64..5e5dc0a1428 100644 --- a/erpnext/stock/dashboard/item_dashboard.js +++ b/erpnext/stock/dashboard/item_dashboard.js @@ -75,13 +75,21 @@ erpnext.stock.ItemDashboard = Class.extend({ this.content.find('.more').addClass('hidden'); } - // If not any stock in any warehouses provide a message to end user + // If not any stock in any warehouses provide a message to end user if (context.data.length > 0) { $(frappe.render_template('item_dashboard_list', context)).appendTo(this.result); } else { var message = __(" Currently no stock available in any warehouse") $(""+message+"").appendTo(this.result); } + + if (frappe.boot.user.can_write.indexOf("Stock Entry")>=0){ + $(".btn-move").show(); + + $(".btn-add").show(); + }else{ + $(".btn-move").hide(); + + $(".btn-add").hide(); + } }, get_item_dashboard_data: function(data, max_count, show_item) { if(!max_count) max_count = 0;