def set_hidden(module_name, user=None, hidden=1):
 if user:
  icon = get_user_copy(module_name, user)
  if (hidden and icon.custom):
   frappe.delete_doc(icon.doctype, icon.name, ignore_permissions=True)
   return
  icon.db_set(u'hidden', hidden)
 else:
  icon = frappe.get_doc(u'Desktop Icon', {u'standard': 1, u'module_name': module_name})
  icon.db_set(u'blocked', hidden)

def set_hidden ( module_name , user = None , hidden = 1 ) : if user : icon = get_user_copy ( module_name , user ) if ( hidden and icon . custom ) : frappe . delete_doc ( icon . doctype , icon . name , ignore_permissions = True ) return icon . db_set ( u'hidden' , hidden ) else : icon = frappe . get_doc ( u'Desktop Icon' , { u'standard' : 1 , u'module_name' : module_name } ) icon . db_set ( u'blocked' , hidden )
set module hidden property for given user .