Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
106
auto_backup/view/db_backup_view.xml
Executable file
106
auto_backup/view/db_backup_view.xml
Executable file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_backup_conf_form" model="ir.ui.view">
|
||||
<field name="model">db.backup</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="action_backup"
|
||||
type="object"
|
||||
string="Execute backup"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" />
|
||||
</h1>
|
||||
</div>
|
||||
<group string="Basic backup configuration">
|
||||
<field name="folder" />
|
||||
<field name="days_to_keep" />
|
||||
<field name="method" />
|
||||
<field name="backup_format" />
|
||||
</group>
|
||||
<div invisible="method != 'sftp'">
|
||||
<div class="bg-warning">
|
||||
<h3>Warning:</h3>
|
||||
Use SFTP with caution! This writes files to external servers under the path you specify.
|
||||
</div>
|
||||
<group string="SFTP Settings">
|
||||
<field name="sftp_host" placeholder="sftp.example.com" />
|
||||
<field name="sftp_port" />
|
||||
<field name="sftp_user" placeholder="john" />
|
||||
<field name="sftp_password" />
|
||||
<field
|
||||
name="sftp_private_key"
|
||||
placeholder="/home/odoo/.ssh/id_rsa"
|
||||
/>
|
||||
<button
|
||||
name="action_sftp_test_connection"
|
||||
type="object"
|
||||
string="Test SFTP Connection"
|
||||
icon="fa-television"
|
||||
/>
|
||||
</group>
|
||||
</div>
|
||||
<separator string="Help" colspan="2" />
|
||||
<div>
|
||||
Automatic backups of the database can be scheduled as follows:
|
||||
<ol>
|
||||
<li
|
||||
>Go to Settings / Technical / Automation / Scheduled Actions.</li>
|
||||
<li>Search the action named 'Backup scheduler'.</li>
|
||||
<li
|
||||
>Set the scheduler to active and fill in how often you want backups generated.</li>
|
||||
</ol>
|
||||
</div>
|
||||
</sheet>
|
||||
<chatter>
|
||||
<field name="message_follower_ids" groups="base.group_user" />
|
||||
<field name="message_ids" />
|
||||
</chatter>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_backup_conf_list" model="ir.ui.view">
|
||||
<field name="model">db.backup</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="folder" />
|
||||
<field name="days_to_keep" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_backup_conf_search" model="ir.ui.view">
|
||||
<field name="model">db.backup</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" />
|
||||
<field name="folder" />
|
||||
<field name="sftp_host" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_backup_conf_form" model="ir.actions.act_window">
|
||||
<field name="name">Automated Backups</field>
|
||||
<field name="res_model">db.backup</field>
|
||||
</record>
|
||||
<menuitem
|
||||
parent="base.next_id_9"
|
||||
action="action_backup_conf_form"
|
||||
id="backup_conf_menu"
|
||||
/>
|
||||
<!-- Execute backup from "More" menu -->
|
||||
<record id="action_server_backup" model="ir.actions.server">
|
||||
<field name="name">Execute backup(s)</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_db_backup" />
|
||||
<field name="binding_model_id" ref="model_db_backup" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">records.action_backup()</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user