bemade-addons/odoo_to_odoo_bemade/views/sync_instance_views.xml
mathis 4d92c5a72f [IMP] odoo_to_odoo_sync: implement dependency management, fix connection errors, and add field mapping
- Added comprehensive dependency management with proper OdooRPC library integration
- Fixed XML-RPC, JSON-RPC, and OdooRPC connection authentication issues
- Implemented proper Odoo 18 API key format support with scope parameter
- Added intelligent field mapping wizard with Full/Required/Balanced modes
- Enhanced error handling and connection state management
- Removed legacy API key system for clean reinstall capability
- Added detailed debug logging for connection troubleshooting
2025-08-15 08:40:48 -04:00

133 lines
6.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Vue formulaire pour les instances de synchronisation -->
<record id="view_odoo_to_bemade_instance_form" model="ir.ui.view">
<field name="name">odoo.to.bemade.instance.form</field>
<field name="model">odoo.to.bemade.instance</field>
<field name="arch" type="xml">
<form string="Instance Bemade">
<header>
<button name="test_connection" string="Tester la connexion" type="object" class="oe_highlight"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,testing,error,connected"/>
</header>
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name" placeholder="Nom de l'instance"/></h1>
</div>
<group>
<group>
<field name="url" placeholder="https://exemple.bemade.org">
<attribute name="readonly">state == 'connected'</attribute>
</field>
<field name="database">
<attribute name="readonly">state == 'connected'</attribute>
</field>
</group>
<group>
<field name="username">
<attribute name="readonly">state == 'connected'</attribute>
</field>
<field name="use_api_key" widget="boolean_toggle"/>
<field name="password" password="True">
<attribute name="readonly">state == 'connected'</attribute>
<attribute name="invisible">use_api_key</attribute>
</field>
<field name="api_key_id">
<attribute name="invisible">not use_api_key</attribute>
<attribute name="required">use_api_key</attribute>
</field>
</group>
</group>
<group>
<field name="connection_type" widget="radio"/>
<field name="active"/>
</group>
<notebook>
<page string="Modèles synchronisés">
<field name="model_ids" mode="list">
<list>
<field name="name"/>
<field name="model_id"/>
<field name="target_model"/>
<field name="active"/>
</list>
</field>
</page>
<page string="Options avancées">
<group>
<field name="connection_timeout"/>
<field name="retry_count"/>
<field name="retry_delay"/>
</group>
</page>
<page string="Journal de connexion">
<field name="log_ids" mode="list">
<list>
<field name="create_date"/>
<field name="name"/>
<field name="state"/>
</list>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Vue liste pour les instances de synchronisation -->
<record id="view_odoo_to_bemade_instance_tree" model="ir.ui.view">
<field name="name">odoo.to.bemade.instance.tree</field>
<field name="model">odoo.to.bemade.instance</field>
<field name="arch" type="xml">
<list string="Instances Bemade" decoration-success="state == 'connected'" decoration-danger="state == 'error'" decoration-info="state == 'testing'" decoration-muted="state == 'draft'">
<field name="name"/>
<field name="url"/>
<field name="database"/>
<field name="username"/>
<field name="connection_type"/>
<field name="state"/>
<field name="active" invisible="1"/>
</list>
</field>
</record>
<!-- Vue recherche pour les instances de synchronisation -->
<record id="view_odoo_to_bemade_instance_search" model="ir.ui.view">
<field name="name">odoo.to.bemade.instance.search</field>
<field name="model">odoo.to.bemade.instance</field>
<field name="arch" type="xml">
<search string="Rechercher une instance">
<field name="name"/>
<field name="url"/>
<field name="database"/>
<field name="username"/>
<filter string="Actives" name="active" domain="[('active', '=', True)]"/>
<filter string="Connectées" name="connected" domain="[('state', '=', 'connected')]"/>
<filter string="En erreur" name="error" domain="[('state', '=', 'error')]"/>
<group expand="0" string="Regrouper par">
<filter string="État" name="groupby_state" domain="[]" context="{'group_by': 'state'}"/>
<filter string="Type de connexion" name="groupby_connection_type" domain="[]" context="{'group_by': 'connection_type'}"/>
</group>
</search>
</field>
</record>
<!-- Action pour les instances -->
<record id="action_odoo_to_bemade_instances" model="ir.actions.act_window">
<field name="name">Instances Bemade</field>
<field name="res_model">odoo.to.bemade.instance</field>
<field name="view_mode">list,form</field>
<field name="context">{'search_default_active': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Créer votre première instance de connexion à Bemade
</p>
<p>
Une instance représente une connexion à une plateforme Bemade
</p>
</field>
</record>
</odoo>