How to create a Custom App to add functionality to Work Order?

Hello,

In one of the discussion thread it was suggested to build a Custom App to over ride some of the functionalities of Work Order.

How can I do this? I mean we have to customize Work Order to over ride its functionality or is there a better way?

TIA

Yogi Yang

Hi there,

Can you be a bit more specific about what you’re trying to do? If you just need to run some code in response to a document event (save, submit, delete, etc.), the easiest approach would probably be to just use server scripts (no app needed):
https://frappeframework.com/docs/v13/user/en/desk/scripting/server-script

On the other hand, if you want to override class methods in the Work Order python file, you can create an app that uses the override_doctype_class hook:
https://frappeframework.com/docs/v13/user/en/python-api/hooks#override-doctype-class

Hello,

What I want to do is over ride a few features in Work Order like:

When a user clicks on Start button I want to automatically insert Material Transfer entries.

In the same way when a user clicks on Finish button I want to first ask the user to enter Qty Manufactured & Qty Rejected, update the Work Order and then insert necessary Material Transfer entries.

If all the quantity of the item are manufactured then I want to automatically update the Qty to Manufacture in all the Work Orders following current Work Order.

TIA

Yogi Yang