Four x_fc_* fields on res.config.settings backed by ir.config_parameter: retention_days (default 365, 0 = forever), alert_threshold (5), alert_window_min (15), alert_enabled (True). New "Login Audit" block on the General Settings page (gated by base.group_system on the block, NOT on the inherited view record per CLAUDE.md rule #11). CLAUDE.md gotchas added during this task: #5 Boolean config_parameter fields don't round-trip "False" as a string — IrConfigParameter.set_param deletes the row on falsy. Test with assertFalse, never assertEqual(..., "False"). #6 ir.ui.view uses group_ids (Odoo 19 rename mirrored from res.users). Setting groups_id on an ir.ui.view record raises ValueError at install. (The XML attribute groups="..." on inner nodes is unrelated and still works.) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
|
{
|
|
'name': 'Fusion Login Audit',
|
|
'version': '19.0.1.0.0',
|
|
'category': 'Tools',
|
|
'summary': 'Durable login audit log with geo-enrichment, retention, and failure alerts.',
|
|
'description': """
|
|
Fusion Login Audit
|
|
==================
|
|
|
|
Captures every password authentication event (success + failure) in a
|
|
dedicated, append-only audit table. Surfaces history on the user form
|
|
as a smart button + tab (admins only). Async-enriches IPs with country,
|
|
city, and reverse DNS. Emails Settings admins on consecutive-failure
|
|
bursts. Daily retention cron honours a configurable horizon.
|
|
""",
|
|
'author': 'Nexa Systems Inc.',
|
|
'website': 'https://nexasystems.ca',
|
|
'license': 'OPL-1',
|
|
'depends': ['base', 'mail', 'base_setup'],
|
|
'external_dependencies': {
|
|
'python': ['user_agents'],
|
|
},
|
|
'data': [
|
|
'security/ir.model.access.csv',
|
|
'security/security.xml',
|
|
'views/fusion_login_audit_views.xml',
|
|
'views/res_users_views.xml',
|
|
'views/res_config_settings_views.xml',
|
|
'views/menus.xml',
|
|
],
|
|
'installable': True,
|
|
'application': False,
|
|
'auto_install': False,
|
|
}
|