[ADD] maintenance_user_ssh_key: create add-on

This commit is contained in:
Stéphan Sainléger
2026-07-07 12:01:42 +02:00
parent ae5977ef81
commit 6e19575012
10 changed files with 190 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_users_form_ssh_key_inherit" model="ir.ui.view">
<field name="name">res.users.form.ssh.key</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="SSH Keys" name="ssh_keys">
<field name="ssh_key_ids">
<list editable="top">
<field name="key"/>
</list>
</field>
</page>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="ssh_key_view_tree" model="ir.ui.view">
<field name="name">ssh.key.tree</field>
<field name="model">ssh.key</field>
<field name="arch" type="xml">
<list editable="top">
<field name="key"/>
<field name="user_id"/>
</list>
</field>
</record>
<record id="ssh_key_view_form" model="ir.ui.view">
<field name="name">ssh.key.form</field>
<field name="model">ssh.key</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="user_id"/>
</group>
<group>
<field name="key" nolabel="1"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="ssh_key_action" model="ir.actions.act_window">
<field name="name">SSH Keys</field>
<field name="res_model">ssh.key</field>
<field name="view_mode">list,form</field>
</record>
<menuitem
id="menu_ssh_key"
action="ssh_key_action"
parent="base.menu_security"
sequence="50"/>
</odoo>