Customize document lifecycle using doc events and class overrides
summary
Shows concrete code changes: adds a before_insert hook that sets an employee's appraisal_date one year forward and a submit hook that updates the employee when an appraisal posts, implemented via doc_events in hooks.py; demonstrates a class override that replaces the System Console run method so only a custom system console manager role can execute code (prevents System Manager from running arbitrary SQL/Python). Uses Frappe hooks, last-writer wins, and the demos work as shown.
AI-written summary · about
