i had created a folder in the material request folder and in there a file material_request.py then add the doc_events in the hooks.py
What is the issue?
Your path to the method is wrong I suppose? There needs to be three “maintenance_addon” in the path, while you have 2. (I’m only referring to the VSCode screenshot you shared, so I might be wrong)
1 Like
Try what @nikkothari22 said above. Seems path is not right.
Try to put your method outside MaterialRequest class.
2 Likes
@Mohtashim_Shoaib check doc_events in this file erpnext/erpnext/hooks.py at develop · frappe/erpnext · GitHub
Please check this documentation, and follow the simple example. No need the define the method in the class but if you want to class base method then use Override DocType Class.
It’s works for me thanks








