Merge branch 'staging-fixes' of https://github.com/frappe/erpnext into loyalty-program-fix

This commit is contained in:
deepeshgarg007
2019-01-01 19:46:08 +05:30
30 changed files with 686 additions and 316 deletions

View File

@@ -256,7 +256,7 @@ $.extend(erpnext.utils, {
let unscrub_option = frappe.model.unscrub(option);
let user_permission = frappe.defaults.get_user_permissions();
if(user_permission && user_permission[unscrub_option]) {
return user_permission[unscrub_option]["docs"];
return user_permission[unscrub_option].map(perm => perm.doc);
} else {
return $.map(locals[`:${unscrub_option}`], function(c) { return c.name; }).sort();
}