odoo-qweb-templates
하는 일
이 도구는 Odoo 시스템의 문서 템플릿(PDF 송장, 이메일, 웹사이트 페이지 등)을 만드는 데 도움을 줍니다. 정보를 체계적이고 동적으로 표시하는 코드를 생성합니다.
사용하는 경우
- ✓새 맞춤 PDF 보고서를 만들 때.
- ✓자동 이메일 템플릿을 개발할 때.
- ✓웹사이트 페이지에 동적 콘텐츠를 추가하는 경우.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-qweb-templates/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“고객 이름과 총액을 보여 주는 PDF 송장용 QWeb 템플릿을 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
필요한 문서(보고서, 이메일 또는 페이지)를 설명합니다. 도구는 QWeb 코드와 Odoo가 사용할 수 있도록 필요한 설정을 생성합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Odoo QWeb Templates
Overview
QWeb 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.
When to Use This Skill
- Creating a custom PDF report (invoice, delivery slip, certificate).
- Building a QWeb email template triggered by workflow actions.
- Designing Odoo website pages with dynamic content.
- Debugging QWeb rendering errors (
t-if,t-foreachissues).
How It Works
- Activate: Mention
@odoo-qweb-templatesand describe the report or template needed. - Generate: Receive a complete
ir.actions.reportrecord and QWeb template. - Debug: Paste a broken template to identify and fix rendering issues.
Examples
Example 1: Custom PDF Report
<!-- Report Action -->
<record id="action_report_patient_card" model="ir.actions.report">
<field name="name">Patient Card</field>
<field name="model">hospital.patient</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">hospital_management.report_patient_card</field>
<field name="binding_model_id" ref="model_hospital_patient"/>
</record>
<!-- QWeb Template -->
<template id="report_patient_card">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="web.external_layout">
<div class="page">
<h2>Patient Card</h2>
<table class="table table-bordered">
<tr>
<td><strong>Name:</strong></td>
<td><t t-field="doc.name"/></td>
</tr>
<tr>
<td><strong>Doctor:</strong></td>
<td><t t-field="doc.doctor_id.name"/></td>
</tr>
<tr>
<td><strong>Status:</strong></td>
<td><t t-field="doc.state"/></td>
</tr>
</table>
</div>
</t>
</t>
</t>
</template>
Example 2: Conditional Rendering
<!-- Show a warning block only if the patient is not confirmed -->
<t t-if="doc.state == 'draft'">
<div class="alert alert-warning">
<strong>Warning:</strong> This patient has not been confirmed yet.
</div>
</t>
Best Practices
- ✅ Do: Use
t-fieldfor model fields — Odoo auto-formats dates, monetary values, and booleans correctly. - ✅ Do: Use
t-out(Odoo 15+) for safe HTML output of non-field strings. Uset-esconly on Odoo 14 and below (it HTML-escapes output). - ✅ Do: Call
web.external_layoutfor PDF reports to automatically include the company header, footer, and logo. - ✅ Do: Use
_lt()(lazy translation) for translatable string literals inside Python report helpers, not inlinet-esc. - ❌ Don't: Use raw Python expressions inside QWeb — compute values in the model or a report
_get_report_values()helper. - ❌ Don't: Forget
t-aswhen usingt-foreach; without it, you can't access the current record in the loop body. - ❌ Don't: Use
t-escwhere you intend to render HTML content — it will escape the tags and print them as raw text.
Limitations
- Does not cover website controller routing for dynamic QWeb pages — that requires Python
http.routeknowledge. - Email template QWeb has different variable scope than report QWeb (
objectvsdocs) — this skill primarily focuses on PDF reports. - QWeb JavaScript (used in Kanban/Form widgets) is a different engine; this skill covers server-side QWeb only.
- Does not cover wkhtmltopdf configuration for PDF rendering issues (page size, margins, header/footer overlap).
자주 묻는 질문
QWeb이란 무엇인가요?
Odoo가 PDF 보고서나 이메일 같은 문서 템플릿을 만들 때 쓰는 언어로, 정보를 동적으로 표시할 수 있게 합니다.
‘t-if’나 ‘t-foreach’ 같은 지시어는 무엇인가요?
QWeb에서 콘텐츠가 어떻게 표시될지 제어하는 특별한 명령입니다. 예를 들어 't-if'는 조건이 참일 때만 무언가를 보여 주고, 't-foreach'는 목록의 각 항목마다 콘텐츠 블록을 반복합니다.
Odoo의 모든 종류의 문서에 사용할 수 있나요?
주로 PDF 보고서, 이메일 템플릿, 웹사이트 페이지에 사용합니다. 복잡한 웹 페이지를 위한 Python 프로그래밍이나 PDF 인쇄 설정은 다루지 않습니다.
상세 정보
작성자의 원본 설명
Expert in Odoo QWeb templating for PDF reports, email templates, and website pages. Covers t-if, t-foreach, t-field, and report actions.
인기도
- GitHub 스타
- 48k
- 순위
- #5349
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.