erpnext-impl-controllers

Guide ERPNext developers in choosing Controllers versus Server Scripts for DocType logic.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package --skill erpnext-impl-controllers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: erpnext-impl-controllers
Source: https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package/tree/main/skills/source/impl/erpnext-impl-controllers
Command: npx skills add https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package --skill erpnext-impl-controllers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides ERPNext developers in deciding when to implement server-side DocType logic with Controllers versus Server Scripts, providing structured workflows to reduce production issues.

Core Features & Use Cases

  • Provides decision trees for selecting the appropriate hook (validate, on_update, before_submit, after_insert, autoname, etc.) and for choosing between controller overrides and extensions.
  • Covers common patterns for submittable documents, naming schemes, change detection, and cross-document interactions with linked docs.
  • Includes best practices, anti-patterns, and concrete examples to accelerate building robust ERPNext apps.

Quick Start

Review the decision trees and implement the recommended hooks in your ERPNext app to align with project requirements.

Frequently Asked Questions about erpnext-impl-controllers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
When should I use ERPNext controllers instead of Server Scripts for DocType logic?

Choosing between ERPNext controllers and Server Scripts depends on logic complexity; controllers suit robust, version-controlled app logic, while Server Scripts handle simpler customizations. This Skill provides decision trees to select the appropriate method and avoid production pitfalls.

How do I override ERPNext controller hooks for submittable documents?

Override ERPNext controller hooks by extending the base DocType controller and implementing workflow methods like before_submit or on_update. This Skill details end-to-end implementation patterns, naming conventions, and override strategies for submittable documents.

What is the best way to detect changes in linked docs within Frappe?

Detect changes in linked Frappe docs by utilizing validate or on_update hooks with specific change detection patterns. This Skill covers cross-document interactions, providing best practices to manage linked dependencies safely and prevent common issues.

Does this Skill cover anti-patterns for Frappe hook implementations?

Yes, this Skill explicitly covers anti-patterns for Frappe hook implementations to prevent common production pitfalls. It provides concrete examples and reference materials detailing what to avoid when building ERPNext apps.

Why am I hitting issues choosing between controller extensions and overrides in ERPNext?

Issues choosing between ERPNext controller extensions and overrides arise from unclear hook scoping and document lifecycle misunderstandings. This Skill provides decision trees to select the correct strategy and avoid production issues.