Hello,
We have seen “how to customize X” post many many times on forums… We are trying to form guidelines and a curated list of approaches to typical customizations.
Why?
Frappe is super customizable and often a bit too much because custom apps allows you to shoot yourself on the foot very easily if you’re not careful. Primarily I believe two things are important when doing customizations:
- Customizations need to be sustainable i.e. shouldn’t break in minor version upgrades and minimal breakages in major upgrades.
- Customizations need to be “correct”, i.e. they shouldn’t cause issues with core behavior.
Sustainable customizations in order of increasing “power”:
- “Customize form”
- Client script for list/form view
- Server scripts - hooks, scheduler, API
- Apps using hooks to override behavior expected to be overridden.
Unsustainable customizations:
- Going against core business logic. (like rolling your own GL entry functions)
- Fiddling with database transactions without knowing how they work (like
db.commit
anddb.rollback
… read more here) You can avoid these in most cases. - Monkey patches. VERY dangerous and unmaintainable.
We are in process of collecting list of common use cases that users want to customize and approaches to them in form of docs + a webinar. Feel free to share your suggestions here.
ref: