Whats the correct way to customize a doctype or form using a custom app?
My use case is as below:
I am trying to hide some fields from the Entry screen when the document loads and some tasks to perform while the document is validated. I have tried it but its not working. I am pasting my code of the the hooks.py file and the function below.
hooks.py
doc_events = {
"Sales Invoice": {
"validate": "cdocs.customizations.customizations.set_terms(self, method)"
}
}
the fuction on the customizations.py file
from __future__ import unicode_literals
import frappe
#from frappe.model.document import Document
def set_terms(self, method):
self.terms="TEST"