🛠️ Odoo移行Helper
Odoo(オー・ドゥー)という業務
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Step-by-step guide for migrating Odoo custom modules between versions (v14→v15→v16→v17). Covers API changes, deprecated methods, and view migration.
🇯🇵 日本人クリエイター向け解説
Odoo(オー・ドゥー)という業務
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o odoo-migration-helper.zip https://jpskill.com/download/3239.zip && unzip -o odoo-migration-helper.zip && rm odoo-migration-helper.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/3239.zip -OutFile "$d\odoo-migration-helper.zip"; Expand-Archive "$d\odoo-migration-helper.zip" -DestinationPath $d -Force; ri "$d\odoo-migration-helper.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
odoo-migration-helper.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
odoo-migration-helperフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Odoo Migration Helper を使って、最小構成のサンプルコードを示して
- › Odoo Migration Helper の主な使い方と注意点を教えて
- › Odoo Migration Helper を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Odoo 移行ヘルパー
概要
Odoo のモジュールをメジャーバージョン間で移行するには、API の変更、非推奨メソッド、フィールド名の変更、新しいビュー構文などを慎重に扱う必要があります。このスキルは、バージョン間の最も一般的な破壊的変更を網羅し、体系的に移行プロセスをガイドします。
このスキルを使用するタイミング
- カスタムモジュールを Odoo 14/15/16 から新しいバージョンにアップグレードする場合。
odoo-upgradeを実行する前に確認すべきことのチェックリストが必要な場合。- バージョンアップ後に非推奨警告を修正する場合。
- 特定の Odoo バージョン間で何が変更されたかを理解する場合。
仕組み
- アクティベート:
@odoo-migration-helperをメンションし、ソースバージョンとターゲットバージョンを指定し、モジュールコードを貼り付けます。 - 分析: 破壊的変更のリストと、変更前後のコード修正を受け取ります。
- 検証: モジュールの機能に特化した移行チェックリストを取得します。
バージョンごとの主な移行変更点
Odoo 16 → 17
| トピック | 旧 (v16) | 新 (v17) |
|---|---|---|
| ビューの可視性 | attrs="{'invisible': [...]}" |
invisible="condition" |
| チャッター | <div class="oe_chatter"> |
<chatter/> |
| 必須/読み取り専用 | attrs="{'required': [...]}" |
required="condition" |
| Python の最小バージョン | 3.10 | 3.10+ |
| JS モジュール | レガシー define(['web.core']) |
ES モジュール import 構文 |
Odoo 15 → 16
| トピック | 旧 (v15) | 新 (v16) |
|---|---|---|
| ウェブサイト公開フラグ | website_published = True |
is_published = True |
| メールエイリアス | 会社上の alias_domain |
mail.alias.domain モデルに移動 |
| レポートレンダリング | _render_qweb_pdf() |
_render_qweb_pdf() (同じですが、シグネチャが変更されました) |
| 会計伝票 | account.move.line グループ化 |
行集計ルールが更新されました |
| メールスレッド | mail_thread_id |
非推奨; message_ids を使用 |
例
例 1: attrs の可視性を Odoo 17 に移行する
<!-- v16 — ドメインベースの attrs -->
<field name="discount" attrs="{'invisible': [('product_type', '!=', 'service')]}"/>
<field name="discount" attrs="{'required': [('state', '=', 'sale')]}"/>
<!-- v17 — インライン Python 式 -->
<field name="discount" invisible="product_type != 'service'"/>
<field name="discount" required="state == 'sale'"/>
例 2: チャッターブロックを移行する
<!-- v16 -->
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<!-- v17 -->
<chatter/>
例 3: website_published フラグを移行する (v15 → v16)
# v15
record.website_published = True
# v16+
record.is_published = True
ベストプラクティス
- ✅ 実行すべきこと: 本番環境にプッシュする前に、各バージョンで
--update=your_moduleを使用してテストしてください。 - ✅ 実行すべきこと: 公式の Odoo Upgrade Guide を使用して、自動化されたアップグレード前分析レポートを取得してください。
- ✅ 実行すべきこと: コミュニティモジュールについては、OCA の移行ノートとモジュールの
HISTORY.rstを確認してください。 - ✅ 実行すべきこと: 移行後に
npm run validateを実行して、マニフェストやフロントマターの問題を早期に検出してください。 - ❌ 実行すべきでないこと: 中間バージョンをスキップしないでください — v14→v15→v16→v17 と順番に進んでください。決して飛び越さないでください。
- ❌ 実行すべきでないこと:
__manifest__.pyのversionを更新することを忘れないでください (例:17.0.1.0.0)。 - ❌ 実行すべきでないこと: OCA モジュールが移行準備ができていると仮定しないでください。ターゲットバージョンの GitHub ブランチを確認してください。
制限事項
- v14 から v17 までのみを対象としています — v13 以前 (マニフェスト以前の時代は根本的にモジュール構造が異なります) は扱っていません。
- Odoo.sh の自動アップグレードパスには、ここでカバーされていない追加のステップがあります。Odoo.sh のドキュメントを参照してください。
- エンタープライズ固有のモジュール (例:
account_accountant,sign) には、文書化されていない破壊的変更がある場合があります。エンタープライズライセンスを持つステージング環境でテストしてください。 - JavaScript OWL コンポーネントの移行 (v15 レガシー → v16 OWL) は複雑なトピックであり、このスキルでは完全にカバーされていません。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
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
- Activate: Mention
@odoo-migration-helper, specify your source and target versions, and paste your module code. - Analyze: Receive a list of breaking changes with before/after code fixes.
- 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_moduleon 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.rstfor community modules. - ✅ Do: Run
npm run validateafter 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
versionin__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.