125 lines
5.3 KiB
XML
125 lines
5.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<!-- Tree View for Database Backup Configuration -->
|
|
<record id="view_db_backup_configure_tree" model="ir.ui.view">
|
|
<field name="name">db.backup.configure.tree</field>
|
|
<field name="model">db.backup.configure</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Database Backup Configurations">
|
|
<field name="name"/>
|
|
<field name="db_name"/>
|
|
<field name="backup_format"/>
|
|
<field name="backup_destination"/>
|
|
<field name="backup_path"/>
|
|
<field name="active"/>
|
|
<field name="last_backup_status" widget="statusbar"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Form View for Database Backup Configuration -->
|
|
<record id="view_db_backup_configure_form" model="ir.ui.view">
|
|
<field name="name">db.backup.configure.form</field>
|
|
<field name="model">db.backup.configure</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Database Backup Configuration">
|
|
<sheet>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="db_name"/>
|
|
<field name="master_pwd" password="True"/>
|
|
<field name="backup_format"/>
|
|
<field name="backup_destination"/>
|
|
<field name="backup_path"/>
|
|
</group>
|
|
<group>
|
|
<field name="active"/>
|
|
<field name="auto_remove"/>
|
|
<field name="days_to_remove"/>
|
|
</group>
|
|
<group>
|
|
<field name="backup_filename" readonly="1"/>
|
|
<field name="generated_exception" readonly="1"/>
|
|
<field name="last_backup_status" widget="statusbar" readonly="1"/>
|
|
<field name="backup_progress" widget="progressbar" readonly="1"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Tree View for Backup Logs -->
|
|
<record id="view_db_backup_log_tree" model="ir.ui.view">
|
|
<field name="name">db.backup.log.tree</field>
|
|
<field name="model">db.backup.log</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Backup Logs">
|
|
<field name="db_config_id"/>
|
|
<field name="backup_date"/>
|
|
<field name="status" widget="statusbar"/>
|
|
<field name="file_size" widget="float"/>
|
|
<field name="details"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Form View for Backup Logs -->
|
|
<record id="view_db_backup_log_form" model="ir.ui.view">
|
|
<field name="name">db.backup.log.form</field>
|
|
<field name="model">db.backup.log</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Backup Log Details">
|
|
<sheet>
|
|
<group>
|
|
<field name="db_config_id"/>
|
|
<field name="backup_date"/>
|
|
<field name="status" widget="statusbar"/>
|
|
<field name="file_path" readonly="1"/>
|
|
<field name="file_size" widget="float" readonly="1"/>
|
|
</group>
|
|
<group>
|
|
<field name="details" readonly="1"/>
|
|
</group>
|
|
<footer>
|
|
<button name="download_backup" string="Download" type="object" class="btn-primary"/>
|
|
<button name="delete_backup" string="Delete" type="object" class="btn-danger"/>
|
|
</footer>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Action for Database Backup Configuration -->
|
|
<record id="action_db_backup_configure" model="ir.actions.act_window">
|
|
<field name="name">Database Backup Configurations</field>
|
|
<field name="res_model">db.backup.configure</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_create">
|
|
Click to create a new database backup configuration.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Action for Backup Logs -->
|
|
<record id="action_db_backup_log" model="ir.actions.act_window">
|
|
<field name="name">Backup Logs</field>
|
|
<field name="res_model">db.backup.log</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_create">
|
|
No backup logs yet. Configure backups and start the process.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Menu Items -->
|
|
<menuitem id="menu_db_backup_configure_root" name="Database Backup" parent="base.menu_custom" sequence="10"/>
|
|
<menuitem id="menu_db_backup_configure" name="Configurations"
|
|
parent="menu_db_backup_configure_root"
|
|
action="action_db_backup_configure" sequence="10"/>
|
|
<menuitem id="menu_db_backup_logs" name="Backup Logs"
|
|
parent="menu_db_backup_configure_root"
|
|
action="action_db_backup_log" sequence="20"/>
|
|
|
|
</odoo> |