Workflow conditions in erpnext

Can we add conditions in workflow?
If material requests of amount less than 5000 i need to approve by stock manager.How can I handle it?

Hi @Jeemon_George,

You can add a condition for the Transition to be applicable. For example, in this case, if sales executive creates a quotation with grand total of $100,000 or more, a particular role must approve. For this to happen in the particular transition, you can set a property for condition:

doc.grand_total <= 100000

Please check it.

ok. Thanks.

here how i get grand total in material request.

Material Request form does not Grand Total field; therefore, you need to add a custom field named “Grand Total.” You must also establish the logic using a client/server script to aggregate the totals from Material Request items into the Grand Total. Once this is set up, you can then implement conditions within the workflow based on this field.

Let me check.

Can we add python code for calculating grand total in workflow condition?

No @Jeemon_George

First set the calculation in custom field.

ok.thanks.


Above Picture shows my workflow.When condition(total >5000) satisfies need to approve material reqyest by manager.Otherwise no need of approval.After saving Material Request we have to create purchase order without any approval.How handle in this scenario?

Please check the documentation.

Let me check.