Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)48k · #5343

odoo-migration-helper

Skill này làm gì

Hướng dẫn này giúp bạn cập nhật các chương trình Odoo tùy chỉnh từ phiên bản này sang phiên bản khác (như từ 14 lên 15, hoặc 16 lên 17). Nó chỉ ra những thay đổi phổ biến có thể làm hỏng mã và cách sửa.

Khi nào nên dùng

  • ✓Khi bạn cần nâng cấp một chương trình Odoo cũ lên phiên bản mới hơn.
  • ✓Khi muốn có danh sách những việc cần kiểm tra trước khi nâng cấp Odoo.
  • ✓Khi cần sửa các lỗi xuất hiện sau khi nâng cấp.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-migration-helper/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-migration-helper/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

“Giúp tôi chuyển module từ Odoo 16 sang 17, tập trung vào thay đổi hiển thị trường và 'chatter'.”

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

Cách hoạt động

Bạn cho tôi biết các phiên bản Odoo bạn đang dùng (cũ và mới) và cho tôi xem mã chương trình. Tôi sẽ phân tích các thay đổi cần thiết và đưa ra hướng dẫn từng bước kèm cách sửa.

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 Migration Helper

Overview

Migrating Odoo modules between major versions requires careful handling of API changes, deprecated methods, renamed fields, and new view syntax. This skill guides you through the migration process systematically, covering the most common breaking changes between versions.

When to Use This Skill

  • Upgrading a custom module from Odoo 14/15/16 to a newer version.
  • Getting a checklist of things to check before running odoo-upgrade.
  • Fixing deprecation warnings after a version upgrade.
  • Understanding what changed between two specific Odoo versions.

How It Works

  1. Activate: Mention @odoo-migration-helper, specify your source and target versions, and paste your module code.
  2. Analyze: Receive a list of breaking changes with before/after code fixes.
  3. Validate: Get a migration checklist specific to your module's features.

Key Migration Changes by Version

Odoo 16 → 17

Topic Old (v16) New (v17)
View visibility attrs="{'invisible': [...]}" invisible="condition"
Chatter <div class="oe_chatter"> <chatter/>
Required/Readonly attrs="{'required': [...]}" required="condition"
Python minimum 3.10 3.10+
JS modules Legacy define(['web.core']) ES module import syntax

Odoo 15 → 16

Topic Old (v15) New (v16)
Website published flag website_published = True is_published = True
Mail aliases alias_domain on company Moved to mail.alias.domain model
Report render _render_qweb_pdf() _render_qweb_pdf() (same, but signature changed)
Accounting move account.move.line grouping Line aggregation rules updated
Email threading mail_thread_id Deprecated; use message_ids

Examples

Example 1: Migrate attrs visibility to Odoo 17

<!-- v16 — domain-based attrs -->
<field name="discount" attrs="{'invisible': [('product_type', '!=', 'service')]}"/>
<field name="discount" attrs="{'required': [('state', '=', 'sale')]}"/>

<!-- v17 — inline Python expressions -->
<field name="discount" invisible="product_type != 'service'"/>
<field name="discount" required="state == 'sale'"/>

Example 2: Migrate Chatter block

<!-- v16 -->
<div class="oe_chatter">
    <field name="message_follower_ids"/>
    <field name="activity_ids"/>
    <field name="message_ids"/>
</div>

<!-- v17 -->
<chatter/>

Example 3: Migrate website_published flag (v15 → v16)

# v15
record.website_published = True

# v16+
record.is_published = True

Best Practices

  • ✅ Do: Test with --update=your_module on each version before pushing to production.
  • ✅ Do: Use the official Odoo Upgrade Guide to get an automated pre-upgrade analysis report.
  • ✅ Do: Check OCA migration notes and the module's HISTORY.rst for community modules.
  • ✅ Do: Run npm run validate after migration to catch manifest or frontmatter issues early.
  • ❌ Don't: Skip intermediate versions — go v14→v15→v16→v17 sequentially; never jump.
  • ❌ Don't: Forget to update version in __manifest__.py (e.g., 17.0.1.0.0).
  • ❌ Don't: Assume OCA modules are migration-ready; check their GitHub branch for the target version.

Limitations

  • Covers v14 through v17 only — does not address v13 or older (pre-manifest era has fundamentally different module structure).
  • The Odoo.sh automated upgrade path has additional steps not covered here; refer to Odoo.sh documentation.
  • Enterprise-specific modules (e.g., account_accountant, sign) may have undocumented breaking changes; test on a staging environment with Enterprise license.
  • JavaScript OWL component migration (v15 Legacy → v16 OWL) is a complex topic not fully covered by this skill.
Câu hỏi thường gặp

Hướng dẫn này bao quát những phiên bản Odoo nào?

Nó bao quát việc nâng cấp giữa các phiên bản Odoo 14, 15, 16 và 17.

“Chatter” là gì?

'Chatter' là khu vực trong Odoo nơi hiển thị tin nhắn, người theo dõi và hoạt động của một bản ghi. Cách đưa nó vào mã đã thay đổi giữa phiên bản 16 và 17.

Tôi có cần nâng cấp từng phiên bản một không?

Có, nên nâng cấp lần lượt từ phiên bản này sang phiên bản kế tiếp (như 14 lên 15, rồi 15 lên 16) thay vì bỏ qua các phiên bản.

Chi tiết

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

Step-by-step guide for migrating Odoo custom modules between versions (v14→v15→v16→v17). Covers API changes, deprecated methods, and view migration.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5343
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ự