What problem does it solve?
This Skill prevents common, production-breaking mistakes when implementing Frappe Jinja templates for Print Formats, Email/Notification templates, Portal pages, and reusable template methods.
Core Features & Use Cases
- Choose the correct template type & engine behavior: uses Jinja syntax for Print Formats and templates, and warns about JS microtemplates for Report Print Formats to avoid blank output.
- Implement correct formatting and localization: ensures numbers, dates, and currency use doc.get_formatted() and wraps user-facing strings with _() for translations.
- Render safely and efficiently: avoids N+1 queries in templates, handles null values with defaults/conditionals, and restricts | safe usage to trusted HTML only.
- Support full template workflows: covers Print Format creation, Email Template/Notification message authoring, Portal page context + rendering, custom jenv methods/filters, and practical debugging patterns.
- Handle PDF rendering differences across Frappe versions: includes rules and CSS guidance to reduce wkhtmltopdf inconsistencies and notes V16 Chrome PDF differences.
Quick Start
Ask the AI to generate a complete Jinja Print Format template for Sales Invoice (v14/v15) that renders correctly in PDF by using get_formatted for currency/date, safe child-table formatting with row.get_formatted(..., doc), and translation-ready labels.