{"id":"94ff49e0-64e7-4155-91fc-05c5d977d5d4","shortId":"hZTPG3","kind":"skill","title":"odoo-qweb-templates","tagline":"Expert in Odoo QWeb templating for PDF reports, email templates, and website pages. Covers t-if, t-foreach, t-field, and report actions.","description":"# Odoo QWeb Templates\n\n## Overview\n\nQWeb is Odoo's primary templating engine, used for PDF reports, website pages, and email templates. This skill generates correct, well-structured QWeb XML with proper directives, translation support, and report action bindings.\n\n## When to Use This Skill\n\n- Creating a custom PDF report (invoice, delivery slip, certificate).\n- Building a QWeb email template triggered by workflow actions.\n- Designing Odoo website pages with dynamic content.\n- Debugging QWeb rendering errors (`t-if`, `t-foreach` issues).\n\n## How It Works\n\n1. **Activate**: Mention `@odoo-qweb-templates` and describe the report or template needed.\n2. **Generate**: Receive a complete `ir.actions.report` record and QWeb template.\n3. **Debug**: Paste a broken template to identify and fix rendering issues.\n\n## Examples\n\n### Example 1: Custom PDF Report\n\n```xml\n<!-- Report Action -->\n<record id=\"action_report_patient_card\" model=\"ir.actions.report\">\n    <field name=\"name\">Patient Card</field>\n    <field name=\"model\">hospital.patient</field>\n    <field name=\"report_type\">qweb-pdf</field>\n    <field name=\"report_name\">hospital_management.report_patient_card</field>\n    <field name=\"binding_model_id\" ref=\"model_hospital_patient\"/>\n</record>\n\n<!-- QWeb Template -->\n<template id=\"report_patient_card\">\n    <t t-call=\"web.html_container\">\n        <t t-foreach=\"docs\" t-as=\"doc\">\n            <t t-call=\"web.external_layout\">\n                <div class=\"page\">\n                    <h2>Patient Card</h2>\n                    <table class=\"table table-bordered\">\n                        <tr>\n                            <td><strong>Name:</strong></td>\n                            <td><t t-field=\"doc.name\"/></td>\n                        </tr>\n                        <tr>\n                            <td><strong>Doctor:</strong></td>\n                            <td><t t-field=\"doc.doctor_id.name\"/></td>\n                        </tr>\n                        <tr>\n                            <td><strong>Status:</strong></td>\n                            <td><t t-field=\"doc.state\"/></td>\n                        </tr>\n                    </table>\n                </div>\n            </t>\n        </t>\n    </t>\n</template>\n```\n\n### Example 2: Conditional Rendering\n\n```xml\n<!-- Show a warning block only if the patient is not confirmed -->\n<t t-if=\"doc.state == 'draft'\">\n    <div class=\"alert alert-warning\">\n        <strong>Warning:</strong> This patient has not been confirmed yet.\n    </div>\n</t>\n```\n\n## Best Practices\n\n- ✅ **Do:** Use `t-field` for model fields — Odoo auto-formats dates, monetary values, and booleans correctly.\n- ✅ **Do:** Use `t-out` (Odoo 15+) for safe HTML output of non-field strings. Use `t-esc` only on Odoo 14 and below (it HTML-escapes output).\n- ✅ **Do:** Call `web.external_layout` for PDF reports to automatically include the company header, footer, and logo.\n- ✅ **Do:** Use `_lt()` (lazy translation) for translatable string literals inside Python report helpers, not inline `t-esc`.\n- ❌ **Don't:** Use raw Python expressions inside QWeb — compute values in the model or a report `_get_report_values()` helper.\n- ❌ **Don't:** Forget `t-as` when using `t-foreach`; without it, you can't access the current record in the loop body.\n- ❌ **Don't:** Use `t-esc` where you intend to render HTML content — it will escape the tags and print them as raw text.\n\n## Limitations\n\n- Does not cover **website controller routing** for dynamic QWeb pages — that requires Python `http.route` knowledge.\n- **Email template** QWeb has different variable scope than report QWeb (`object` vs `docs`) — this skill primarily focuses on PDF reports.\n- QWeb JavaScript (used in Kanban/Form widgets) is a different engine; this skill covers **server-side QWeb only**.\n- Does not cover **wkhtmltopdf configuration** for PDF rendering issues (page size, margins, header/footer overlap).","tags":["odoo","qweb","templates","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding"],"capabilities":["skill","source-sickn33","skill-odoo-qweb-templates","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/odoo-qweb-templates","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34666 github stars · SKILL.md body (3,896 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-23T06:51:41.685Z","embedding":null,"createdAt":"2026-04-18T21:41:52.374Z","updatedAt":"2026-04-23T06:51:41.685Z","lastSeenAt":"2026-04-23T06:51:41.685Z","tsv":"'1':113,151 '14':226 '15':209 '2':127,171 '3':137 'access':304 'action':30,67,91 'activ':114 'auto':195 'auto-format':194 'automat':242 'best':183 'bind':68 'bodi':311 'boolean':201 'broken':141 'build':83 'call':235 'card':157,164,166 'certif':82 'compani':245 'complet':131 'comput':276 'condit':172 'configur':394 'confirm':181 'content':98,324 'control':341 'correct':54,202 'cover':18,339,384,392 'creat':74 'current':306 'custom':76,152 'date':197 'debug':99,138 'deliveri':80 'describ':121 'design':92 'differ':356,380 'direct':62 'doc':364 'doctor':168 'dynam':97,344 'email':13,49,86,352 'engin':41,381 'error':102 'esc':222,267,317 'escap':232,327 'exampl':149,150,170 'expert':5 'express':273 'field':27,189,192,217 'fix':146 'focus':368 'footer':247 'foreach':24,108,298 'forget':290 'format':196 'generat':53,128 'get':284 'header':246 'header/footer':402 'helper':262,287 'hospital.patient':158 'hospital_management.report':162 'html':212,231,323 'html-escap':230 'http.route':350 'identifi':144 'includ':243 'inlin':264 'insid':259,274 'intend':320 'invoic':79 'ir.actions.report':132 'issu':109,148,398 'javascript':373 'kanban/form':376 'knowledg':351 'layout':237 'lazi':253 'limit':336 'liter':258 'logo':249 'loop':310 'lt':252 'margin':401 'mention':115 'model':191,280 'monetari':198 'name':167 'need':126 'non':216 'non-field':215 'object':362 'odoo':2,7,31,37,93,117,193,208,225 'odoo-qweb-templ':1,116 'output':213,233 'overlap':403 'overview':34 'page':17,47,95,346,399 'past':139 'patient':156,163,165,177 'pdf':11,44,77,153,161,239,370,396 'practic':184 'primari':39 'primarili':367 'print':331 'proper':61 'python':260,272,349 'qweb':3,8,32,35,58,85,100,118,135,160,275,345,354,361,372,388 'qweb-pdf':159 'raw':271,334 'receiv':129 'record':133,307 'render':101,147,173,322,397 'report':12,29,45,66,78,123,154,240,261,283,285,360,371 'requir':348 'rout':342 'safe':211 'scope':358 'server':386 'server-sid':385 'side':387 'size':400 'skill':52,73,366,383 'skill-odoo-qweb-templates' 'slip':81 'source-sickn33' 'status':169 'string':218,257 'structur':57 'support':64 't-as':291 't-esc':220,265,315 't-field':25,187 't-foreach':22,106,296 't-if':19,103 't-out':205 'tag':329 'templat':4,9,14,33,40,50,87,119,125,136,142,353 'text':335 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'translat':63,254,256 'trigger':88 'use':42,71,186,204,219,251,270,295,314,374 'valu':199,277,286 'variabl':357 'vs':363 'warn':175 'web.external':236 'websit':16,46,94,340 'well':56 'well-structur':55 'widget':377 'without':299 'wkhtmltopdf':393 'work':112 'workflow':90 'xml':59,155,174 'yet':182","prices":[{"id":"a3c8304b-bd29-45f1-9432-e87895053114","listingId":"94ff49e0-64e7-4155-91fc-05c5d977d5d4","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:41:52.374Z"}],"sources":[{"listingId":"94ff49e0-64e7-4155-91fc-05c5d977d5d4","source":"github","sourceId":"sickn33/antigravity-awesome-skills/odoo-qweb-templates","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/odoo-qweb-templates","isPrimary":false,"firstSeenAt":"2026-04-18T21:41:52.374Z","lastSeenAt":"2026-04-23T06:51:41.685Z"}],"details":{"listingId":"94ff49e0-64e7-4155-91fc-05c5d977d5d4","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"odoo-qweb-templates","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34666,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-23T06:41:03Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"b69446a305ef4e59f844668d6706fc0b74ab183c","skill_md_path":"skills/odoo-qweb-templates/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/odoo-qweb-templates"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"odoo-qweb-templates","description":"Expert in Odoo QWeb templating for PDF reports, email templates, and website pages. Covers t-if, t-foreach, t-field, and report actions."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/odoo-qweb-templates"},"updatedAt":"2026-04-23T06:51:41.685Z"}}