diff --git a/fusion_helpdesk_central/__manifest__.py b/fusion_helpdesk_central/__manifest__.py index 2666d0f9..440534f3 100644 --- a/fusion_helpdesk_central/__manifest__.py +++ b/fusion_helpdesk_central/__manifest__.py @@ -3,7 +3,7 @@ # License OPL-1 { 'name': 'Fusion Helpdesk Central — Client API Keys', - 'version': '19.0.2.1.0', + 'version': '19.0.2.2.0', 'category': 'Productivity', 'summary': 'Admin UI on the central Odoo for issuing per-client API ' 'keys used by fusion_helpdesk client deployments.', @@ -37,6 +37,7 @@ Depends only on `helpdesk`. No client-side install needed. 'views/engagement_wizard_views.xml', 'views/engagement_reporting_views.xml', 'views/portal_templates.xml', + 'views/res_config_settings_views.xml', ], 'installable': True, 'auto_install': False, diff --git a/fusion_helpdesk_central/models/__init__.py b/fusion_helpdesk_central/models/__init__.py index 0fd8b428..abf07869 100644 --- a/fusion_helpdesk_central/models/__init__.py +++ b/fusion_helpdesk_central/models/__init__.py @@ -2,3 +2,4 @@ from . import fusion_helpdesk_client_key from . import helpdesk_ticket from . import engagement_wizard +from . import res_config_settings diff --git a/fusion_helpdesk_central/models/res_config_settings.py b/fusion_helpdesk_central/models/res_config_settings.py new file mode 100644 index 00000000..cf0763ca --- /dev/null +++ b/fusion_helpdesk_central/models/res_config_settings.py @@ -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.', + ) diff --git a/fusion_helpdesk_central/views/res_config_settings_views.xml b/fusion_helpdesk_central/views/res_config_settings_views.xml new file mode 100644 index 00000000..7fb0d930 --- /dev/null +++ b/fusion_helpdesk_central/views/res_config_settings_views.xml @@ -0,0 +1,52 @@ + + + + + + res.config.settings.view.form.fusion.helpdesk.central + res.config.settings + + + + + + + + + + + + + + + + + + + + + + +