62 lines
2.6 KiB
XML
62 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Form View -->
|
|
<record id="view_sync_config_form" model="ir.ui.view">
|
|
<field name="name">sync.config.form</field>
|
|
<field name="model">sync.config</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Database Sync Configuration">
|
|
<sheet>
|
|
<group>
|
|
<group string="Target Database Details">
|
|
<field name="name"/>
|
|
<field name="target_url" widget="url"/>
|
|
<field name="target_db"/>
|
|
<field name="target_username"/>
|
|
<field name="target_password"/>
|
|
</group>
|
|
<group string="Sync Settings">
|
|
<field name="model_to_sync"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Actions">
|
|
<p class="text-muted">Click the button below to push all active records of the selected model to the target database.</p>
|
|
<button name="action_sync_data" string="🔄 Sync Data Now" type="object" class="btn-primary"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Tree (List) View -->
|
|
<record id="view_sync_config_tree" model="ir.ui.view">
|
|
<field name="name">sync.config.tree</field>
|
|
<field name="model">sync.config</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Sync Configurations">
|
|
<field name="name"/>
|
|
<field name="target_url"/>
|
|
<field name="target_db"/>
|
|
<field name="model_to_sync"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Action -->
|
|
<record id="action_sync_config" model="ir.actions.act_window">
|
|
<field name="name">Database Sync</field>
|
|
<field name="res_model">sync.config</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create a new target database configuration to start syncing.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Menu Item -->
|
|
<menuitem id="menu_sync_root" name="Data Sync" web_icon="db_data_sync,static/description/icon.png"/>
|
|
<menuitem id="menu_sync_config" name="Configurations" parent="menu_sync_root" action="action_sync_config"/>
|
|
</odoo> |