feat(fusion_helpdesk_central): expose OpenAI key + cron settings in UI
Adding the 'Fusion Helpdesk Central' block to General Settings so the three ICP keys the engagement flow reads are configurable from a real form instead of forcing admins to open Technical → System Parameters. Three settings, all wired via config_parameter= so the existing read paths (engagement_wizard, _fc_send_engagement_reminders) keep working unchanged: - fusion_helpdesk_central.openai_api_key (password widget — doesn't render plaintext on the form) - fusion_helpdesk_central.openai_model (default 'gpt-4o-mini') - fusion_helpdesk_central.engagement_reminder_days (default 3, 0 disables the reminder cron entirely) Bumps fusion_helpdesk_central to 19.0.2.2.0. Find under Settings → Fusion Helpdesk Central. The block has two sub-sections: "Owner Approval — AI Summary" (key + model) and "Owner Approval — Reminder Cadence" (days).
This commit is contained in:
@@ -2,3 +2,4 @@
|
||||
from . import fusion_helpdesk_client_key
|
||||
from . import helpdesk_ticket
|
||||
from . import engagement_wizard
|
||||
from . import res_config_settings
|
||||
|
||||
45
fusion_helpdesk_central/models/res_config_settings.py
Normal file
45
fusion_helpdesk_central/models/res_config_settings.py
Normal file
@@ -0,0 +1,45 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2026 Nexa Systems Inc.
|
||||
# License OPL-1
|
||||
"""Settings for fusion_helpdesk_central exposed via General Settings.
|
||||
|
||||
Surfaces the three ICP keys the engagement flow reads — OpenAI key /
|
||||
model / reminder cadence — so admins don't have to dig into Technical →
|
||||
System Parameters to set up the AI summary or change the reminder
|
||||
window. All three are stored in ir.config_parameter via the
|
||||
`config_parameter=` shortcut so the existing read paths
|
||||
(engagement_wizard, helpdesk_ticket._fc_send_engagement_reminders)
|
||||
continue to work unchanged.
|
||||
"""
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
fhc_openai_api_key = fields.Char(
|
||||
string='OpenAI API Key',
|
||||
config_parameter='fusion_helpdesk_central.openai_api_key',
|
||||
help='Server-side key the engagement wizard uses to generate AI '
|
||||
'summaries on Engage. Leave blank to disable AI summaries — '
|
||||
'the wizard still works, you just write the brief manually. '
|
||||
'Keep secret: anyone with access to System Parameters could '
|
||||
'read it back.',
|
||||
)
|
||||
fhc_openai_model = fields.Char(
|
||||
string='OpenAI Model',
|
||||
config_parameter='fusion_helpdesk_central.openai_model',
|
||||
default='gpt-4o-mini',
|
||||
help='OpenAI model used for the engagement summary. Default '
|
||||
'gpt-4o-mini balances cost and quality — switch to gpt-4o '
|
||||
'or gpt-4o-2024-08-06 if you find summaries too thin.',
|
||||
)
|
||||
fhc_engagement_reminder_days = fields.Integer(
|
||||
string='Reminder After (days)',
|
||||
config_parameter='fusion_helpdesk_central.engagement_reminder_days',
|
||||
default=3,
|
||||
help='Days of inaction before the cron sends a single follow-up '
|
||||
'reminder to the owner. Set to 0 to disable reminders '
|
||||
'entirely. The cron sends at most one reminder per '
|
||||
'engagement regardless of this value.',
|
||||
)
|
||||
Reference in New Issue
Block a user