Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)48k · #5356

odoo-xml-views-builder

Skill này làm gì

Agent AI này giúp tạo và sửa mã XML cho Odoo, một hệ thống quản trị doanh nghiệp. Nó tạo các view như biểu mẫu, danh sách và bảng Kanban để tổ chức và hiển thị thông tin.

Khi nào nên dùng

  • ✓Tạo một biểu mẫu mới để ghi nhận thông tin khách hàng.
  • ✓Thêm danh sách sản phẩm vào màn hình bán hàng.
  • ✓Tổ chức thông tin trên một bảng trực quan (Kanban) để theo dõi công việc.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-xml-views-builder/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-xml-views-builder/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một biểu mẫu XML cho model 'Product' với các trường 'name', 'price' và 'description'.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn mô tả loại view cần thiết (biểu mẫu, danh sách, v.v.) và cho model dữ liệu nào. AI tạo mã XML sẵn sàng dùng cho Odoo, hoặc xem lại mã bạn đã có.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Odoo XML Views Builder

Overview

This skill generates and reviews Odoo XML view definitions for Kanban, Form, List, Search, Calendar, and Graph views. It understands visibility modifiers, groups, domain, context, and widget usage across Odoo versions 14–17, including the migration from attrs (v14–16) to inline expressions (v17+).

When to Use This Skill

  • Creating a new form or list view for a custom model.
  • Adding fields, tabs, or smart buttons to an existing view.
  • Building a Kanban view with color coding or progress bars.
  • Creating a search view with filters and group-by options.

How It Works

  1. Activate: Mention @odoo-xml-views-builder and describe the view you want.
  2. Generate: Get complete, ready-to-paste XML view definitions.
  3. Review: Paste existing XML and get fixes for common mistakes.

Examples

Example 1: Form View with Tabs

<record id="view_hospital_patient_form" model="ir.ui.view">
    <field name="name">hospital.patient.form</field>
    <field name="model">hospital.patient</field>
    <field name="arch" type="xml">
        <form string="Patient">
            <header>
                <button name="action_confirm" string="Confirm"
                    type="object" class="btn-primary"
                    invisible="state != 'draft'"/>
                <field name="state" widget="statusbar"
                    statusbar_visible="draft,confirmed,done"/>
            </header>
            <sheet>
                <div class="oe_title">
                    <h1><field name="name" placeholder="Patient Name"/></h1>
                </div>
                <notebook>
                    <page string="General Info">
                        <group>
                            <field name="birth_date"/>
                            <field name="doctor_id"/>
                        </group>
                    </page>
                </notebook>
            </sheet>
            <chatter/>
        </form>
    </field>
</record>

Example 2: Kanban View

<record id="view_hospital_patient_kanban" model="ir.ui.view">
    <field name="name">hospital.patient.kanban</field>
    <field name="model">hospital.patient</field>
    <field name="arch" type="xml">
        <kanban default_group_by="state" class="o_kanban_small_column">
            <field name="name"/>
            <field name="state"/>
            <field name="doctor_id"/>
            <templates>
                <t t-name="kanban-card">
                    <div class="oe_kanban_content">
                        <strong><field name="name"/></strong>
                        <div>Doctor: <field name="doctor_id"/></div>
                    </div>
                </t>
            </templates>
        </kanban>
    </field>
</record>

Best Practices

  • ✅ Do: Use inline invisible="condition" (Odoo 17+) instead of attrs for show/hide logic.
  • ✅ Do: Use attrs="{'invisible': [...]}" only if you are targeting Odoo 14–16 — it is deprecated in v17.
  • ✅ Do: Always set a string attribute on your view record for debugging clarity.
  • ✅ Do: Use <chatter/> (v17) or <div class="oe_chatter"> + field tags (v16 and below) for activity tracking.
  • ❌ Don't: Use attrs in Odoo 17 — it is fully deprecated and raises warnings in logs.
  • ❌ Don't: Put business logic in view XML — keep it in Python model methods.
  • ❌ Don't: Use hardcoded domain strings in views when a domain field on the model can be used dynamically.

Limitations

  • Does not cover OWL JavaScript widgets or client-side component development.
  • Search panel views (<searchpanel>) are not fully covered — those require frontend knowledge.
  • Does not address website QWeb views — use @odoo-qweb-templates for those.
  • Cohort and Map views (Enterprise-only) are not covered by this skill.
Câu hỏi thường gặp

View XML trong Odoo là gì?

Đó là các đoạn mã định nghĩa cách thông tin được trình bày trên màn hình cho người dùng, như biểu mẫu nhập liệu, danh sách mục hoặc bảng theo dõi.

“Kanban”, “Form” và “List” view là gì?

'Form' dùng để xem và sửa từng mục một. 'List' hiển thị nhiều mục theo hàng. 'Kanban' dùng thẻ để biểu diễn các mục, phù hợp với quy trình làm việc.

“Odoo 14-17” nghĩa là gì?

Nó cho biết các phiên bản Odoo mà mã này tương thích. Mã có thể cần chỉnh sửa nhỏ giữa các phiên bản.

Chi tiết

Mô tả gốc của tác giả

Expert at building Odoo XML views: Form, List, Kanban, Search, Calendar, and Graph. Generates correct XML for Odoo 14-17 with proper visibility syntax.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5356
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự