fix(addon): create bot partner via post_init_hook instead of XML

XML record creation bypasses ORM defaults causing NOT NULL violation
on autopost_bills (added by account module). Hook uses ORM create()
which applies all field defaults correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Carlos Garcia
2026-04-24 22:17:43 -04:00
parent 65957339ef
commit d5381220fb
2 changed files with 23 additions and 1 deletions

View File

@@ -15,7 +15,6 @@ CRM, sales, project management, eLearning, expenses, and HR.
'data': [
'security/res_groups.xml',
'security/ir.model.access.csv',
'data/res_partner_bot.xml',
'data/ir_cron.xml',
'views/ab_ai_bot_views.xml',
'views/ab_ai_directive_views.xml',
@@ -35,4 +34,5 @@ CRM, sales, project management, eLearning, expenses, and HR.
'installable': True,
'application': True,
'auto_install': False,
'post_init_hook': '_create_ai_bot_partner',
}