How can we create workflow for timesheet to approve and reject

here i am trying to create workflow for timesheet to approve, reject but its not working and in action (only approve button is coming, i need reject button also)
Screenshot from 2024-08-01 17-23-54

@Prashanth_Kolhetkar once you approved the timesheet after that reject button is shown

image
change to open

@manal_erpnext if it is change to direct open to rejected error message is show because Open status is docstatus 0 and rejected is 2 so you cant change draft to cancel you have first submit the timesheet for that rejected status should be change 2 to 1

yes
but he want to display the reject with approve and the same first status must be the same

1 Like

@manal_erpnext rejected status should be change 2 to 1 so he can do it and both button is shown same time

let them try

yaa its visible but i want both button at a time not seprate

@Prashanth_Kolhetkar do this

ooo noo broo my requirement is to see both button at a time

or else i have to delete button and make i drop down for approve and reject

then i have to submit after marking status as approve

if i do open → reject → rejected then it will not allow

message comes like u can not cancel, u have to submit then after acncel it

@Prashanth_Kolhetkar change docstatus for rejected 1 in above table

thanks both came but “status is not changing”

@Prashanth_Kolhetkar status is not update there is one field workflow_state this is updated

see @Prashanth_Kolhetkar for understand what happen exactly
image
when you click here
image
then you will approve and submit in the same click