Workflow: Reject to Cancelled as the First Option

Dear All,

I would like to have a simple workflow that activates once the document is saved. E.g. Material Request is firstly Saved, then it will prompt 2 options (1) Approve (2) Reject. If Approve is selected, the document status should be Submitted, if Reject is selected, the document status should be Cancelled. 

I can get the Approval portion to work. The Rejection portion however does not move the document status to Cancelled. I read comments that you cannot move document status from Saved to Rejection. If this is the case, how do you handle simple approvals like this? Do you plainly leave document status as Saved if it is rejected?

Thank you.


Javier





You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/988d6a54-1def-48a6-88cc-3b8efcf2a5ff%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hi Javier,


Just to refer existing discussion and resources we have for your query:

https://erpnext.com/user-guide/setting-up/workflows
https://groups.google.com/forum/#!topic/erpnext-developer-forum/zu-xvSMLMWM
https://www.youtube.com/watch?v=zuGv59_wJKw

----
Sunil
Nescode (http://nescode.com)
Partner for ERPNext


On Tuesday, August 5, 2014 11:44:03 AM UTC+5:30, Javier wrote:
Dear All,

I would like to have a simple workflow that activates once the document is saved. E.g. Material Request is firstly Saved, then it will prompt 2 options (1) Approve (2) Reject. If Approve is selected, the document status should be Submitted, if Reject is selected, the document status should be Cancelled. 

I can get the Approval portion to work. The Rejection portion however does not move the document status to Cancelled. I read comments that you cannot move document status from Saved to Rejection. If this is the case, how do you handle simple approvals like this? Do you plainly leave document status as Saved if it is rejected?

Thank you.


Javier





You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/0d00eb35-9069-40a0-89ba-9c5b4caf39ec%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Dear Sunil,

Thanks for the reply. I had previously read all those posts and watched the video. Perhaps it was not written clearly in my previous post. But I am wondering, if I simply just want and Approve / Reject action, where Approve pushes the document to Submitted status and the Reject pushes the document to Cancelled status. Is this possible? 

If you look at the Youtube video, there is a State (Item 4) "Rejected --> 2 --> status --> Rejected --> Leave Approver". This state will never occur for Doc Status 2 when the document is in the "Applied" state and when the manager selects the Reject action (Transition Rule 2). I have personally tried this setup and it does not work. Unless there is something that I am missing here?

If I am at all completely wrong, how do you handle documents that need to be Rejected up front?

Thanks very much once again.


Javier

On Tuesday, August 5, 2014 2:40:15 PM UTC+8, Sunil Kumar wrote:
Hi Javier,

Just to refer existing discussion and resources we have for your query:


----
Sunil
Partner for ERPNext


On Tuesday, August 5, 2014 11:44:03 AM UTC+5:30, Javier wrote:
Dear All,

I would like to have a simple workflow that activates once the document is saved. E.g. Material Request is firstly Saved, then it will prompt 2 options (1) Approve (2) Reject. If Approve is selected, the document status should be Submitted, if Reject is selected, the document status should be Cancelled. 

I can get the Approval portion to work. The Rejection portion however does not move the document status to Cancelled. I read comments that you cannot move document status from Saved to Rejection. If this is the case, how do you handle simple approvals like this? Do you plainly leave document status as Saved if it is rejected?

Thank you.


Javier





You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a248e831-947b-48be-aa8b-63ea722e056b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



Dear Sunil,

Thanks for the reply. I had previously read all those posts and watched the video. Perhaps it was not written clearly in my previous post. But I am wondering, if I simply just want and Approve / Reject action, where Approve pushes the document to Submitted status and the Reject pushes the document to Cancelled status. Is this possible? 

Yeah should be easily possible. Did you give it a try (?)


If you look at the Youtube video, there is a State (Item 4) "Rejected --> 2 --> status --> Rejected --> Leave Approver". This state will never occur for Doc Status 2 when the document is in the "Applied" state and when the manager selects the Reject action (Transition Rule 2). I have personally tried this setup and it does not work. Unless there is something that I am missing here?

If I am at all completely wrong, how do you handle documents that need to be Rejected up front?

Thanks very much once again.


Javier

On Tuesday, August 5, 2014 2:40:15 PM UTC+8, Sunil Kumar wrote:
Hi Javier,

Just to refer existing discussion and resources we have for your query:


----
Sunil
Partner for ERPNext


On Tuesday, August 5, 2014 11:44:03 AM UTC+5:30, Javier wrote:
Dear All,

I would like to have a simple workflow that activates once the document is saved. E.g. Material Request is firstly Saved, then it will prompt 2 options (1) Approve (2) Reject. If Approve is selected, the document status should be Submitted, if Reject is selected, the document status should be Cancelled. 

I can get the Approval portion to work. The Rejection portion however does not move the document status to Cancelled. I read comments that you cannot move document status from Saved to Rejection. If this is the case, how do you handle simple approvals like this? Do you plainly leave document status as Saved if it is rejected?

Thank you.


Javier






You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a248e831-947b-48be-aa8b-63ea722e056b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/F8F9BDBD-C2BD-4D3A-B6FC-EB0FAB5534AB%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

Yes I did, it didnt work. If Current Document Status is 0 - Saved there is no way to move it to 2-Cancelled.

On Tuesday, August 5, 2014 4:40:32 PM UTC+8, Rushabh Mehta wrote:


Dear Sunil,

Thanks for the reply. I had previously read all those posts and watched the video. Perhaps it was not written clearly in my previous post. But I am wondering, if I simply just want and Approve / Reject action, where Approve pushes the document to Submitted status and the Reject pushes the document to Cancelled status. Is this possible? 

Yeah should be easily possible. Did you give it a try (?)


If you look at the Youtube video, there is a State (Item 4) "Rejected --> 2 --> status --> Rejected --> Leave Approver". This state will never occur for Doc Status 2 when the document is in the "Applied" state and when the manager selects the Reject action (Transition Rule 2). I have personally tried this setup and it does not work. Unless there is something that I am missing here?

If I am at all completely wrong, how do you handle documents that need to be Rejected up front?

Thanks very much once again.


Javier

On Tuesday, August 5, 2014 2:40:15 PM UTC+8, Sunil Kumar wrote:
Hi Javier,

Just to refer existing discussion and resources we have for your query:


----
Sunil
Partner for ERPNext


On Tuesday, August 5, 2014 11:44:03 AM UTC+5:30, Javier wrote:
Dear All,

I would like to have a simple workflow that activates once the document is saved. E.g. Material Request is firstly Saved, then it will prompt 2 options (1) Approve (2) Reject. If Approve is selected, the document status should be Submitted, if Reject is selected, the document status should be Cancelled. 

I can get the Approval portion to work. The Rejection portion however does not move the document status to Cancelled. I read comments that you cannot move document status from Saved to Rejection. If this is the case, how do you handle simple approvals like this? Do you plainly leave document status as Saved if it is rejected?

Thank you.


Javier






You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a248e831-947b-48be-aa8b-63ea722e056b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a4e6696c-7ac0-4ddd-b576-7aa51ab28fe1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hi Javier,

In ERPNext, Submitted implies a freezed document, whereas Cancelled implies that a freezed document was Incorrect and has been Cancelled, until further modified using Amend.


I would recommend that you setup a Material Request workflow like:
  1. Create a custom field called "Approval Status" of type Select and with 2 possible values: Approved, Rejected
  2. All Material Requests should be submitted for Approval --> status = "Submitted", docstatus = 1
  3. Approve --> Approval Status = Approved, status = "Submitted", docstatus = 1
  4. Reject --> Approval Status = Rejected, status = "Cancelled", docstatus = 1

  5. Ask users to check for "Approval Status" for further processing.

I think this would work for you.

Thanks,
Anand.



On Tue, Aug 5, 2014 at 4:53 PM, Javier <bo...@gmail.com> wrote:
Yes I did, it didnt work. If Current Document Status is 0 - Saved there is no way to move it to 2-Cancelled.


On Tuesday, August 5, 2014 4:40:32 PM UTC+8, Rushabh Mehta wrote:



Dear Sunil,

Thanks for the reply. I had previously read all those posts and watched the video. Perhaps it was not written clearly in my previous post. But I am wondering, if I simply just want and Approve / Reject action, where Approve pushes the document to Submitted status and the Reject pushes the document to Cancelled status. Is this possible?

Yeah should be easily possible. Did you give it a try (?)


If you look at the Youtube video, there is a State (Item 4) "Rejected --> 2 --> status --> Rejected --> Leave Approver". This state will never occur for Doc Status 2 when the document is in the "Applied" state and when the manager selects the Reject action (Transition Rule 2). I have personally tried this setup and it does not work. Unless there is something that I am missing here?

If I am at all completely wrong, how do you handle documents that need to be Rejected up front?

Thanks very much once again.


Javier


On Tuesday, August 5, 2014 2:40:15 PM UTC+8, Sunil Kumar wrote:

Hi Javier,

Just to refer existing discussion and resources we have for your query:


----

Sunil

Partner for ERPNext


On Tuesday, August 5, 2014 11:44:03 AM UTC+5:30, Javier wrote:
Dear All,

I would like to have a simple workflow that activates once the document is saved. E.g. Material Request is firstly Saved, then it will prompt 2 options (1) Approve (2) Reject. If Approve is selected, the document status should be Submitted, if Reject is selected, the document status should be Cancelled.

I can get the Approval portion to work. The Rejection portion however does not move the document status to Cancelled. I read comments that you cannot move document status from Saved to Rejection. If this is the case, how do you handle simple approvals like this? Do you plainly leave document status as Saved if it is rejected?

Thank you.


Javier






You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a248e831-947b-48be-aa8b-63ea722e056b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a4e6696c-7ac0-4ddd-b576-7aa51ab28fe1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/CAAQzbF1n5ByBfpHEL8BxvpUO-nUS0ZQ0nH2QLUonGyZ%2BonGiHw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Dear Anand,

The only problem is say for step no. 2 (e.g. for a Sales Order), before the document is "Approved" the document is already in status = "Submitted", docstatus =1, which means that the user is able to create invoices based on the Sales Order because within ERPNext the docstatus = 1. 

Is there anyway to stop this from happening? I.e. stop the user from creating an invoice without an Approved Sales Order?

Thank you.


Javier


On Tuesday, August 5, 2014 7:44:31 PM UTC+8, Anand Doshi wrote:
Hi Javier,

In ERPNext, Submitted implies a freezed document, whereas Cancelled implies that a freezed document was Incorrect and has been Cancelled, until further modified using Amend.


I would recommend that you setup a Material Request workflow like:
  1. Create a custom field called “Approval Status” of type Select and with 2 possible values: Approved, Rejected
  2. All Material Requests should be submitted for Approval --> status = "Submitted", docstatus = 1
  3. Approve --> Approval Status = Approved, status = "Submitted", docstatus = 1
  4. Reject --> Approval Status = Rejected, status = “Cancelled”, docstatus = 1

  5. Ask users to check for “Approval Status” for further processing.

I think this would work for you.

Thanks,
Anand.



On Tue, Aug 5, 2014 at 4:53 PM, Javier <bo...@gmail.com> wrote:
Yes I did, it didnt work. If Current Document Status is 0 - Saved there is no way to move it to 2-Cancelled.


On Tuesday, August 5, 2014 4:40:32 PM UTC+8, Rushabh Mehta wrote:



Dear Sunil,

Thanks for the reply. I had previously read all those posts and watched the video. Perhaps it was not written clearly in my previous post. But I am wondering, if I simply just want and Approve / Reject action, where Approve pushes the document to Submitted status and the Reject pushes the document to Cancelled status. Is this possible? 

Yeah should be easily possible. Did you give it a try (?)


If you look at the Youtube video, there is a State (Item 4) "Rejected --> 2 --> status --> Rejected --> Leave Approver". This state will never occur for Doc Status 2 when the document is in the "Applied" state and when the manager selects the Reject action (Transition Rule 2). I have personally tried this setup and it does not work. Unless there is something that I am missing here?

If I am at all completely wrong, how do you handle documents that need to be Rejected up front?

Thanks very much once again.


Javier


On Tuesday, August 5, 2014 2:40:15 PM UTC+8, Sunil Kumar wrote:

Hi Javier,

Just to refer existing discussion and resources we have for your query:


----

Sunil

Partner for ERPNext


On Tuesday, August 5, 2014 11:44:03 AM UTC+5:30, Javier wrote:
Dear All,

I would like to have a simple workflow that activates once the document is saved. E.g. Material Request is firstly Saved, then it will prompt 2 options (1) Approve (2) Reject. If Approve is selected, the document status should be Submitted, if Reject is selected, the document status should be Cancelled. 

I can get the Approval portion to work. The Rejection portion however does not move the document status to Cancelled. I read comments that you cannot move document status from Saved to Rejection. If this is the case, how do you handle simple approvals like this? Do you plainly leave document status as Saved if it is rejected?

Thank you.


Javier






You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+unsubscribe@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a248e831-947b-48be-aa8b-63ea722e056b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a4e6696c-7ac0-4ddd-b576-7aa51ab28fe1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/81c004df-c890-47c9-a71c-4b8332fa1fad%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

‎Hi All,

Trust everyone's doing great. I also think this needs to be looked into. I've run into similar issues while developing workflows for docs like leave applications and expense claims. It's not enough to 'tell' users not to continue the process based on the value of a field; the system should restrict them from doing so. 

At the end of the day, we're forced to leave a long trail of documents in the saved status upon rejection. It would be great to have a simple solution like having the doc cancelled upon rejection (without submitting first) just like Javier was asking. ‎Alternatives might be ability to Submit and then Cancel with one click or have another doc status that functions similar to the cancelled status. 

Whatever the approach, I think there's a bit of tidying up to do here. 

As always, thanks for the great work guys!


Kind regards,
Olawale ‎
From: Javier
Sent: Tuesday, August 12, 2014 7:03 AM
To: er...@googlegroups.com
Reply To: er...@googlegroups.com
Subject: Re: [erpnext-user-forum] Re: Workflow: Reject to Cancelled as the First Option

Dear Anand,

The only problem is say for step no. 2 (e.g. for a Sales Order), before the document is "Approved" the document is already in status = "Submitted", docstatus =1, which means that the user is able to create invoices based on the Sales Order because within ERPNext the docstatus = 1. 

Is there anyway to stop this from happening? I.e. stop the user from creating an invoice without an Approved Sales Order?

Thank you.


Javier


On Tuesday, August 5, 2014 7:44:31 PM UTC+8, Anand Doshi wrote:
Hi Javier,

In ERPNext, Submitted implies a freezed document, whereas Cancelled implies that a freezed document was Incorrect and has been Cancelled, until further modified using Amend.


I would recommend that you setup a Material Request workflow like:
  1. Create a custom field called “Approval Status” of type Select and with 2 possible values: Approved, Rejected
  2. All Material Requests should be submitted for Approval --> status = "Submitted", docstatus = 1
  3. Approve --> Approval Status = Approved, status = "Submitted", docstatus = 1
  4. Reject --> Approval Status = Rejected, status = “Cancelled”, docstatus = 1

  5. Ask users to check for “Approval Status” for further processing.

I think this would work for you.

Thanks,
Anand.



On Tue, Aug 5, 2014 at 4:53 PM, Javier <bo...@gmail.com> wrote:
Yes I did, it didnt work. If Current Document Status is 0 - Saved there is no way to move it to 2-Cancelled.


On Tuesday, August 5, 2014 4:40:32 PM UTC+8, Rushabh Mehta wrote:



Dear Sunil,

Thanks for the reply. I had previously read all those posts and watched the video. Perhaps it was not written clearly in my previous post. But I am wondering, if I simply just want and Approve / Reject action, where Approve pushes the document to Submitted status and the Reject pushes the document to Cancelled status. Is this possible? 

Yeah should be easily possible. Did you give it a try (?)


If you look at the Youtube video, there is a State (Item 4) "Rejected --> 2 --> status --> Rejected --> Leave Approver". This state will never occur for Doc Status 2 when the document is in the "Applied" state and when the manager selects the Reject action (Transition Rule 2). I have personally tried this setup and it does not work. Unless there is something that I am missing here?

If I am at all completely wrong, how do you handle documents that need to be Rejected up front?

Thanks very much once again.


Javier


On Tuesday, August 5, 2014 2:40:15 PM UTC+8, Sunil Kumar wrote:

Hi Javier,

Just to refer existing discussion and resources we have for your query:


----

Sunil

Partner for ERPNext


On Tuesday, August 5, 2014 11:44:03 AM UTC+5:30, Javier wrote:
Dear All,

I would like to have a simple workflow that activates once the document is saved. E.g. Material Request is firstly Saved, then it will prompt 2 options (1) Approve (2) Reject. If Approve is selected, the document status should be Submitted, if Reject is selected, the document status should be Cancelled. 

I can get the Approval portion to work. The Rejection portion however does not move the document status to Cancelled. I read comments that you cannot move document status from Saved to Rejection. If this is the case, how do you handle simple approvals like this? Do you plainly leave document status as Saved if it is rejected?

Thank you.


Javier






You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+unsubscribe@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a248e831-947b-48be-aa8b-63ea722e056b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a4e6696c-7ac0-4ddd-b576-7aa51ab28fe1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/81c004df-c890-47c9-a71c-4b8332fa1fad%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/20140812071526.5374085.79327.9265%40xavierltd.com.

For more options, visit https://groups.google.com/d/optout.

Yeah makes sense.

https://github.com/frappe/erpnext/issues/2052

best,
Rushabh


On 12-Aug-2014, at 12:45 pm, wa...@xavierltd.com wrote:

‎Hi All,

Trust everyone's doing great. I also think this needs to be looked into. I've run into similar issues while developing workflows for docs like leave applications and expense claims. It's not enough to 'tell' users not to continue the process based on the value of a field; the system should restrict them from doing so. 

At the end of the day, we're forced to leave a long trail of documents in the saved status upon rejection. It would be great to have a simple solution like having the doc cancelled upon rejection (without submitting first) just like Javier was asking. ‎Alternatives might be ability to Submit and then Cancel with one click or have another doc status that functions similar to the cancelled status. 

Whatever the approach, I think there's a bit of tidying up to do here. 

As always, thanks for the great work guys!


Kind regards,
Olawale ‎
From: Javier
Sent: Tuesday, August 12, 2014 7:03 AM
Subject: Re: [erpnext-user-forum] Re: Workflow: Reject to Cancelled as the First Option

Dear Anand,

The only problem is say for step no. 2 (e.g. for a Sales Order), before the document is "Approved" the document is already in status = "Submitted", docstatus =1, which means that the user is able to create invoices based on the Sales Order because within ERPNext the docstatus = 1. 

Is there anyway to stop this from happening? I.e. stop the user from creating an invoice without an Approved Sales Order?

Thank you.


Javier


On Tuesday, August 5, 2014 7:44:31 PM UTC+8, Anand Doshi wrote:
Hi Javier,

In ERPNext, Submitted implies a freezed document, whereas Cancelled implies that a freezed document was Incorrect and has been Cancelled, until further modified using Amend.


I would recommend that you setup a Material Request workflow like:
  1. Create a custom field called “Approval Status” of type Select and with 2 possible values: Approved, Rejected
  2. All Material Requests should be submitted for Approval --> status = "Submitted", docstatus = 1
  3. Approve --> Approval Status = Approved, status = "Submitted", docstatus = 1
  4. Reject --> Approval Status = Rejected, status = “Cancelled”, docstatus = 1

  5. Ask users to check for “Approval Status” for further processing.

I think this would work for you.

Thanks,
Anand.



On Tue, Aug 5, 2014 at 4:53 PM, Javier <bo...@gmail.com> wrote:
Yes I did, it didnt work. If Current Document Status is 0 - Saved there is no way to move it to 2-Cancelled.


On Tuesday, August 5, 2014 4:40:32 PM UTC+8, Rushabh Mehta wrote:



Dear Sunil,

Thanks for the reply. I had previously read all those posts and watched the video. Perhaps it was not written clearly in my previous post. But I am wondering, if I simply just want and Approve / Reject action, where Approve pushes the document to Submitted status and the Reject pushes the document to Cancelled status. Is this possible? 

Yeah should be easily possible. Did you give it a try (?)


If you look at the Youtube video, there is a State (Item 4) "Rejected --> 2 --> status --> Rejected --> Leave Approver". This state will never occur for Doc Status 2 when the document is in the "Applied" state and when the manager selects the Reject action (Transition Rule 2). I have personally tried this setup and it does not work. Unless there is something that I am missing here?

If I am at all completely wrong, how do you handle documents that need to be Rejected up front?

Thanks very much once again.


Javier


On Tuesday, August 5, 2014 2:40:15 PM UTC+8, Sunil Kumar wrote:

Hi Javier,

Just to refer existing discussion and resources we have for your query:


----

Sunil

Partner for ERPNext


On Tuesday, August 5, 2014 11:44:03 AM UTC+5:30, Javier wrote:
Dear All,

I would like to have a simple workflow that activates once the document is saved. E.g. Material Request is firstly Saved, then it will prompt 2 options (1) Approve (2) Reject. If Approve is selected, the document status should be Submitted, if Reject is selected, the document status should be Cancelled. 

I can get the Approval portion to work. The Rejection portion however does not move the document status to Cancelled. I read comments that you cannot move document status from Saved to Rejection. If this is the case, how do you handle simple approvals like this? Do you plainly leave document status as Saved if it is rejected?

Thank you.


Javier






You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+unsubscribe@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a248e831-947b-48be-aa8b-63ea722e056b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a4e6696c-7ac0-4ddd-b576-7aa51ab28fe1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/81c004df-c890-47c9-a71c-4b8332fa1fad%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/20140812071526.5374085.79327.9265%40xavierltd.com.

For more options, visit https://groups.google.com/d/optout.




You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/E8ABB39F-3D92-4A76-B188-C5C6B75D481C%40gmail.com.

For more options, visit https://groups.google.com/d/optout.