Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

odoo-report

БесплатноБез исполняемых скриптовНе проверен

Professional Odoo Email Templates & QWeb Reports - Complete toolkit for creating, managing, and debugging email templates and PDF reports across Odoo 14-19…

ahmed-lakoshaот ahmed-lakosha★ 79 звёзд на GitHub

Об этом скилле

Odoo Email Templates & QWeb Reports Skill (v2.1)

A skill for creating, managing, debugging, and migrating Odoo email templates and QWeb reports across versions 14-19.

Workflows

This skill handles all template and report workflows via natural language:

What you want What to say
Create email template "Create an email template for sale.order quotation"
Create QWeb PDF report "Create a QWeb PDF report for purchase.order"
Migrate templates "Migrate this template from Odoo 14 to 17"
Analyze template "Analyze this template for issues"
Debug rendering "Debug why my email shows plain text"
Fix template "Fix the broken QWeb expressions"
Validate before deploy "Validate this template before deployment"
List templates "List all templates for sale.order"
Preview output "Preview this email template"

Configuration

  • Supported Versions: Odoo 14, 15, 16, 17, 18, 19
  • Core Model: mail.template
  • Rendering Engines: inline_template (Jinja2-like) for headers, QWeb for body_html

User overrides: Check for odoo-report.local.md in the project .claude/ directory. If found, use its YAML frontmatter settings (default_version, author, default_layout) as defaults.


Template Architecture

mail.template
├── Inherits: mail.render.mixin (rendering engine)
├── Inherits: template.reset.mixin (reset - Odoo 16+)
│
├── Header Fields (inline_template engine):
│   subject, email_from, email_to, email_cc, reply_to, partner_to
│
├── Content Fields (QWeb engine):
│   body_html
│
├── Attachment Fields:
│   attachment_ids (static)
│   report_template (Odoo 14-16) / report_template_ids (Odoo 17+)
│   report_name (dynamic filename)
│
└── Configuration:
    email_layout_xmlid, auto_delete, mail_server_id,
    use_default_to, scheduled_date, template_category (16+)

Rendering Flow

mail.template.send_mail_batch(res_ids)
  ├─► _generate_template(res_ids, render_fields)
  │     ├─► _classify_per_lang()
  │     ├─► _render_field() per field (inline_template or qweb)
  │     ├─► _generate_template_recipients()
  │     ├─► _generate_template_attachments() (static + PDF report)
  │     └─► Return rendered values dict
  ├─► Create mail.mail records
  ├─► Apply email_layout_xmlid (if set)
  └─► Send via mail_server_id or default

Two Rendering Engines

1. Inline Template (Jinja2-like)

Used for: subject, email_from, email_to, email_cc, reply_to, partner_to, lang, scheduled_date

{{ object.name }}
{{ object.partner_id.name }}
{{ (object.user_id.email_formatted or user.email_formatted) }}
{{ object.state == 'draft' and 'Quotation' or 'Order' }}
{{ ctx.get('proforma') and 'Proforma' or '' }}

2. QWeb Engine

Used for: body_html

<!-- Output (use t-out for Odoo 15+, t-esc for Odoo 14) -->
<t t-out="object.name"/>
<t t-out="format_amount(object.amount_total, object.currency_id)"/>

<!-- Conditionals -->
<t t-if="object.state == 'draft'">Draft</t>
<t t-elif="object.state == 'sent'">Sent</t>
<t t-else="">Confirmed</t>

<!-- Loops -->
<t t-foreach="object.order_line" t-as="line">
    <tr><td t-out="line.name"/></tr>
</t>

<!-- Dynamic attributes -->
<a t-att-href="object.get_portal_url()">View</a>

Version Decision Matrix

Feature 14 15 16 17 18 19
Output tag t-esc t-out t-out t-out t-out t-out
report_template (M2O) Y Y Y - - -
report_template_ids (M2M) - - - Y Y Y
template_category - - Y Y Y Y
Company branding colors - - - - - Y
format_datetime() - Y Y Y Y Y
is_html_empty() - - Y Y Y Y

Version Detection Priority

  1. User-specified --version flag
  2. Directory path (odoo14, odoo17, etc.)
  3. __manifest__.py version string (e.g., '17.0.1.0.0')
  4. Ask user if ambiguous

Email Layout Templates

Layout Width Use Case
mail.mail_notification_layout 900px Full notifications with header/footer
mail.mail_notification_light 590px Simple notifications
mail.mail_notification_layout_with_responsible_signature 900px Uses record's user_id signature (16+)

Best Practices

1. Always Use Fallbacks

<t t-out="object.partner_id.name or 'Valued Customer'"/>

2. Use Format Helpers

<t t-out="format_amount(object.amount_total, object.currency_id)"/>
<t t-out="format_date(object.date_order)"/>

3. Use Layouts for Consistency

<field name="email_layout_xmlid">mail.mail_notification_layout</field>

4. Handle Empty HTML (16+)

<t t-if="not is_html_empty(object.description)">
    <div t-out="object.description"/>
</t>

5. Version-Appropriate Output

<!-- Odoo 15+ --> <t t-out="value"/>
<!-- Odoo 14 -->  <t t-esc="value"/>

6. Repor

Полный SKILL.md на GitHub

Установить odoo-report в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Edit
Bash
Glob
Grep
WebFetch

FAQ

Что делает скилл odoo-report?

Professional Odoo Email Templates & QWeb Reports - Complete toolkit for creating, managing, and debugging email templates and PDF reports across Odoo 14-19. Includes wkhtmltopdf setup, Arabic/RTL support, bilingual patterns, and comprehensive validation. <example> Context: User wants to create an email template user: "Create an invoice confirmation email template in Odoo 17" assistant: "I will use the odoo-report skill to create a mail.template record with QWeb body, dynamic fields, and correct ir.attachment handling." <commentary>Core trigger - new email template creation.</commentary> </example> <example> Context: User wants a PDF report user: "Design a QWeb PDF report for purchase orders" assistant: "I will use the odoo-report skill to create a report action, QWeb template with page layout, header/footer, and register it in the module manifest." <commentary>PDF report workflow trigger.</commentary> </example> <example> Context: User has a broken email template user: "My email template is sending plain text instead of HTML" assistant: "I will use the odoo-report skill to diagnose the template body_html field, check subtype_id, and verify the mail.template arch is structured correctly for HTML rendering." <commentary>Debugging trigger - email template not rendering correctly.</commentary> </example> <example> Context: User wants to analyze a template user: "Analyze this email template for issues and improvements" assistant: "I will use the odoo-report skill to check template structure, context variables, rendering patterns, and suggest improvements." <commentary>Analyze trigger - template quality review.</commentary> </example> <example> Context: User wants to migrate templates between versions user: "Migrate my templates from Odoo 14 to 17" assistant: "I will use the odoo-report skill to apply version-specific transformations: t-esc to t-out, report_template to report_template_ids, and add template_category." <commentary>Migration trigger - version upgrade.</comme

Как установить скилл odoo-report?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл odoo-report запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить odoo-report с