Workflow for Material Transfer "Approved by Source Stock"

Hello;

I created Workflow for Stock Entry, but I need to let the allowed users to approve is the Source Stock users and the Destination Stock users (I have two approvals, because both sides should accept to transfer the materials from stock to stock, it requires the approval of the source stock and destination stock).
How I can determine this in the “Only Allowed Edit For”?
If it is possible to be done by writing code, I am ready but I need the advise where I can find the code that is related to the workflow, so I can customize upon the need.
Regards
Bilal

Hello,

Suggestion below.

  1. Create two new roles (Stock Source and Stock Target).
  2. Assign these roles to two different Users. Source users will always verify with the people at the source Warehouse. Same way, Target user will always verify with the person at the receipient warehouse.
  3. Ensure that one User doesn’t have both the roles Stock Source and Stock Target.

Hi Umair;
We can not work based on this way because the source stock in this transaction might become destination stock in another transaction. What I need is the following:
Stock A has users group A and Stock B has users group B and Stock C has users group C. If the transaction was from Stock C to Stock A then it should be approve by users of group C and users of group A. Then if the transaction was from Stock A to Stock B, then it should be approved only by users of group A and users of stock B only.
How can I make the allowed users to be related to what is the selected Source Stock and what is the selected Destination Stock and hence the corresponding users for those stocks. How?

From the other side: will it need to write codes in python? OK, from where I can start?
I believe that it should be a way to write code to customize the workflow logic.
Regards
Bilal

@bghayad @umair Any solution to this?
Seems like a fairly basic requirement when handling material in any domain- manufacturing, service, schools, etc.- There is always a receipt signed by the receiver.

Wondering if this can be solved by user permissions? Assign a user permission for approver and receiver by assigning them a warehouse.

But this might give a problem when doing a stock transfer since the other warehouse may give a permission error.

How about multiple workflows one for each destination with condition to fire workflow for each destination and have that destination user group approve the submit of the transaction?

Has anybody found a different mechanism to acheive this objective?

1 Like

At the moment only one workflow can be active for a doctype. Multiple workflows may not be a possible