Department wise workflow for material request

Continuing the discussion from [SOLVED] Purchase orders not being displayed after change in workflow:

Hi experts,

I have a unique requirement regarding workflow. Detail is as follows:

1 - There are two departments (e.g. electrical & mechanical) to raise material request.
2 - Lets say when electrical user enters a material request.
a) It should be routed to the manager of electrical department defined in payroll module.
b) It should not be visible to mechanical department.

  Same flow is required for mechanical department as above for electrical.

3 - When any material request will be approved by its department head then supply chain department will
proceed for purchase order and so on.

Please let me know how is it possible?

Regards,

Any help?

Hi Zahid,

The way we have set the process is

1.We use the Department Field in the Material Request form
2. Set the user permissions & allow material request only if department is allowed
3. In user permissions allow the required departments for the respective user.

1 Like

Hi chetan,

Thanks for the idea. Standard material request does not have dept field. First I have to customize material request form then I can set user permissions.

Any way it looks practical. I am trying it.

Regards,

Hi Zahid
Yes you need to add the Custom Field for Department
It works fine for us !

Rgds,

Just to sync the idea I followed these steps.

1 - First I customized form “Material Request” & added Department link field.
2 - Added custom script on “Material Request” to fetch department from “Department”.

Above steps are working fine.

Following steps are for setting user permission. (Not tested)

1 - Select Role “Purchase User”.
2 - Select Role Permission Manager
3 - Select Doctype “Material Request”
4 - In Apply user permissions select “show user permissions”
5 - Select
a) user name
b) Doctype “Department”
c) Select department name

6 - Add user restriction and save

Please let me know am I right? Because I am working on test account so can not test user permissions.

Regards,

Zahid

Yes its the same steps - only we have not created any custom script
If you select the Custom field as link & link it to department in options then no custom script is needed

Rgds,

Yes you are right, its working without script.
What about user permission steps? Please confirm me. I have to deploy at my client side and I can not test it here in my account.

Regards,

All other steps are same

Rgds,

Thank you very much for your precious time.

Regards,

1 Like

Hi,

There are two material requests generated one for electrical and other for mechanical department.
I performed following steps as mentioned in my earlier post but no success. When user logs in material request list is empty.

1 - Select Role “Purchase User”.
2 - Select Role Permission Manager
3 - Select Doctype “Material Request”
4 - In Apply user permissions select “show user permissions”
5 - Select
a) user name
b) Doctype “Department”
c) Select department name

6 - Add user restriction and save

Screen shots are attached. Please let me know what is wrong with it.

Regards,

At Step 4 - you need to click " select Document types"
In that check the box “If department is allowed”
Then Select Show User Permissions & follow rest all steps

Rgds,

1 Like

Thanks a lot. Its done.

Regards,

Zahid