fix(addon): create AI bot as internal user; use post_migrate_hook

- Bot needs to be a res.users to appear in Discuss DM search
- post_migrate_hook runs on both install and -u update
- Idempotent: skips creation if user already exists

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Carlos Garcia
2026-04-24 22:20:09 -04:00
parent d5381220fb
commit 01f7037a38
2 changed files with 21 additions and 18 deletions

View File

@@ -34,5 +34,6 @@ CRM, sales, project management, eLearning, expenses, and HR.
'installable': True,
'application': True,
'auto_install': False,
'post_init_hook': '_create_ai_bot_partner',
'post_init_hook': '_ensure_ai_bot_user',
'post_migrate_hook': '_ensure_ai_bot_user',
}