frappe-impl-jinja

Generate Jinja templates for Frappe Print Formats with get_formatted and translation wrapping.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-impl-jinja-impertio-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-impl-jinja
Source: https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/impl/frappe-impl-jinja
Command: npx skills add https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-impl-jinja-impertio-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about frappe-impl-jinja

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

FAQPage Schema
How do I create a Frappe Jinja Print Format that renders correctly in PDF?

To create a Frappe Jinja Print Format that renders correctly in PDF, use Jinja syntax with proper Frappe variables like doc and frappe._. Apply doc.get_formatted() for currency and dates, use row.get_formatted(..., doc) for child tables, and wrap user-facing strings with _() for translations.

Why does my Frappe Print Format show blank output when printing a report?

Frappe Report Print Formats show blank output when using Jinja syntax instead of JS microtemplates. Report Print Formats require JavaScript microtemplate syntax, while standard Print Formats and Email Templates use Jinja syntax with Frappe variables to avoid engine mismatches and rendering failures.

How do I prevent N+1 queries in Frappe Jinja templates?

Prevent N+1 queries in Frappe Jinja templates by preloading related data before rendering and avoiding inline database calls within template loops. Handle null values with defaults or conditionals, and restrict the | safe filter to trusted HTML only to ensure efficient and secure rendering.

Does Frappe PDF rendering work the same across different versions?

Frappe PDF rendering differs across versions due to wkhtmltopdf inconsistencies in v14 and v15, and Chrome PDF rendering differences in v16. Apply specific CSS rules and version-aware styling guidance to reduce wkhtmltopdf inconsistencies and ensure consistent output.

How do I add translation support to Frappe email templates?

Add translation support to Frappe email templates by wrapping user-facing strings with the _() function in your Jinja syntax. This localization step ensures multilingual translation wrapping works correctly across Email Templates, Notifications, and Portal pages.

Can I use Jinja filters and custom methods in Frappe portal pages?

You can use Jinja filters and custom jenv methods in Frappe portal pages by defining reusable template methods and passing context correctly. This supports full template workflows including context rendering, custom filter creation, and practical debugging patterns for portal pages.