Employee Leave Application Workflow

Hi,

I am trying to make workflow for leave approval, but not able to succeed, please take a look on my workflow, I know I am doing some mistake but not able to identify it.

What I want is an Employee will raise a leave application and the leave approver will Approve or Reject it with the Status of Approved or Rejected.

Please take a look on below screenshot of workflow.

Now when I create a Leave application from employee portal, it looks like following screenshot.

As you can see the status is Draft.

Now at the Leave approver side, you can see there is no Action button appeared

But when I click on save button then action button will appear.

From here it works perfect, If I click on approve the status changes to approve, and if I click on Reject the status changes to Rejected.

But I want when employee submits it, it should go to applied status.

I know I am missing something in the workflow rule, but what unable to figure out.

Your suggestions will be highly appreciated.

Regards

@deepak727
This should help.
https://frappe.github.io/erpnext/user/manual/en/setting-up/workflows

Why are you updating the status field? Have you added Applied and Pending options in your status options? If not, don’t update it through the workflow. There is already workflow_state field to capture workflow state.

Hi @Sangram

Thanks for the reply, as I said this workflow is really confusing for me, after removing the status I got what I want.

@ArundhatiS Thank for the link, I will follow it for the next workflow.

Thanks a lot guys.