I am trying to add a field to the student attendance tool. We are planning to mark attendance in the canteen using it, therefore they need to see allergy information. I would like to do this in a way that does not break updates, so I would like to avoid modifying any files in the frappe and erpnext app folders if at all possible.
We have a custom field called “Allergies” in the student doctype, and I have copied the student_attendance_tool.js and student_attendance_tool.py files to our custom app (that we’ve used for a variety of other useful tools and integrations which are very specific to our use case). I have modified the copied files to implement the functionality we need. All that remains is to figure out how to tell frappe to use our copy of it instead of the version in “frappe-bench/apps/erpnext/erpnext/education/doctype/student_attendance_tool”. What exactly do I need to put in my custom app’s hooks.py and/or the python file itself to get it to work?
Yes, and for that you don’t even need to create a new app. For purely client-side stuff, I believe that you can do everything you’re wanting to do with just the Custom Script doctype (under the Setup module).
You need to add you custom script file path in your hooks, he didn’t add in hooks you are right, because there are some other ways you can also make this work.
Like create a file in custom script from your admin panel.
To make it from custom app, first create the file like Purchase Receipt.js and add the file path in hooks.py
rigpl write the code from admin panel, export the fixture, and the script will automatically added in bench migrate