I have used the override_doctype_class hook to override the Contract doctype class with my custom class but even after doing everything in the right way default Contract class is called not my CustomContract class.
Also, this hook is working on my local but not on the server.
Can anyone help me with this?
Hello,
In my hooks.py I have used the override_doctype_class hook but when I tried to run frappe.get_hooks(“override_doctype_class”) in the console it gives me an empty dictionary.
Did anyone face such an issue?
Attaching images for reference:
Hi,
I have the same problem with the doctypes, were you able to solve it?
Thanks!!
Hlo @szufisher,
from onefinance.onefinance.overrides.contract import CustomContract is running without error in console and key is also doctype name but I am facing the same issue.
also check whether the app is installed on the site, I made such mistake before.
Were you able to find a solution, facing the same thing, working locally, but when I ship to production, it doesn’t work?
Try bench migrate in production