first push message
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,24 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<!--
|
||||
<template id="listing">
|
||||
<ul>
|
||||
<li t-foreach="objects" t-as="object">
|
||||
<a t-attf-href="#{ root }/objects/#{ object.id }">
|
||||
<t t-esc="object.display_name"/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
<template id="object">
|
||||
<h1><t t-esc="object.display_name"/></h1>
|
||||
<dl>
|
||||
<t t-foreach="object._fields" t-as="field">
|
||||
<dt><t t-esc="field"/></dt>
|
||||
<dd><t t-esc="object[field]"/></dd>
|
||||
</t>
|
||||
</dl>
|
||||
</template>
|
||||
-->
|
||||
</data>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user