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:
@@ -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',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user