ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Approval Status must be 'Approved' or 'Rejected'


#1

After creating a workflow for expense claim.
When tried the workflow on an expense claim doc, i couldn’t submit it. The error message said"Approval Status must be ‘Approved’ or 'Rejected’
When i go back to my work flow state to change the draft to Rejected,another system error will say that “You cant Cancel before Submitting


#2


#3

This is related to Doc Status. pls share a screenshot of your workflow.


#4

Okay sir. I have a problem sending complete snapshot of my workflow because this page said i cant upload more than one picture as a new user.

Though my workflow is quite long,but i have tested it all the way to the last one,but when i want to summit it will give the error message.


#5


#6


#7

This is now the error message


#8

Check if the Rejected state has docstatus = 2 in the states table.

Draft =0
Submitted=1
Cancelled=2

Looks like the rejected state is assigned docstatus =2. Logically, you can’t set a document to cancelled state unless it is submitted. So that transition has to come after document submission.


#9

So what should i do sir?


#10

I think there is a status field in doctype that should be set to approved or rejected


Here the approval status, are you setting it to approved or rejected before submitting?


#11

The approval status is not highlighted for me to choose an option


#12

I went to doc type to change and saw that approval status has:
Draft
Approved
Rejected
I change it to only two options,Approved or Rejected but i cant save it after. Its showing error message.


Find snapshot error message


#13

Oh then I am not sure what could be the problem as by default I had this field in the doctype,and I have not really worked on this doctype


#14

Maybe editing the options is creating issue as there will be some code for the “draft” option