bemade-addons/odoo_proxmox_manager/wizard/proxmox_server_wizard_views.xml
2025-05-29 21:35:47 -04:00

67 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_proxmox_server_wizard_form" model="ir.ui.view">
<field name="name">proxmox.server.wizard.form</field>
<field name="model">proxmox.server.wizard</field>
<field name="arch" type="xml">
<form string="Configuration Serveur Proxmox">
<header>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<group states="connect">
<group>
<field name="name" placeholder="Ex: Proxmox-1"/>
<field name="hostname" placeholder="Ex: proxmox.example.com"/>
<field name="port"/>
</group>
<group>
<field name="username" placeholder="Ex: root@pam"/>
<field name="password" password="True"/>
<field name="verify_ssl"/>
</group>
</group>
<group states="config" attrs="{'invisible': [('state', '!=', 'config')]}">
<group>
<field name="is_cluster"/>
<field name="cluster_name" attrs="{'invisible': [('is_cluster', '=', False)], 'required': [('is_cluster', '=', True)]}"/>
</group>
<group attrs="{'invisible': [('is_cluster', '=', False)]}">
<field name="other_nodes" nolabel="1" colspan="2">
<tree editable="bottom">
<field name="name"/>
<field name="hostname"/>
<field name="port"/>
<field name="username"/>
<field name="password" password="True"/>
</tree>
</field>
</group>
</group>
</sheet>
<footer>
<button name="action_test_connection" string="Tester la connexion" type="object"
class="btn-primary" states="connect"/>
<button name="action_create_server" string="Créer" type="object"
class="btn-primary" states="config"/>
<button string="Annuler" class="btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_proxmox_server_wizard" model="ir.actions.act_window">
<field name="name">Ajouter un serveur Proxmox</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">proxmox.server.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem id="menu_proxmox_server_wizard"
name="Ajouter un serveur"
action="action_proxmox_server_wizard"
parent="menu_proxmox_server_root"
sequence="10"/>
</odoo>