Department wise workflow

I need department wise workflow for ‘material request’ doctype.

User can make material request for any item. He/she will select department and items. Now suppose user select IT department. So this material request will go to only IT manager/IT user. Then he/she will approve this material request.


I did it successfully.
Here I am describing how to do this

  • Make a workflow
  • must add employee for that particular user which are performed workflow actions (approval/reject…)
  • give a department for every employee user
  • in workflow transition rules go to the row which transition row you want to add department wise restriction
  • click on edit option
  • go to condition section
  • add your condition as requirements -
frappe.db.get_list("Employee", {'department': doc.department, 'user_id': frappe.session.user})