Files
Flectra-Odoo-LDAP-Partner-Sync/views/flectra_res_config_settings_views.xml

96 lines
5.7 KiB
XML
Raw Permalink Normal View History

2025-06-26 08:41:56 +02:00
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.ldap.settings</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//form" position="inside">
<div class="app_settings_block" data-string="LDAP Partner Sync Settings" string="LDAP Partner Sync Settings" data-key="ldap_settings">
<h2>LDAP PartnerSync Configuration</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-12 o_setting_box">
<div class="o_setting_right_pane">
<div class="row">
<label for="partner_sync_on" class="col-lg-4 o_light_label"/>
<field name="partner_sync_on" class="col-lg-8"/>
</div>
<div class="row">
<label for="ldap_base" class="col-lg-4 o_light_label"/>
<field name="ldap_base" class="col-lg-8"/>
</div>
<div class="row">
<label for="ldap_host" class="col-lg-4 o_light_label"/>
<field name="ldap_host" class="col-lg-8"/>
</div>
<div class="row">
<label for="ldap_port" class="col-lg-4 o_light_label"/>
<field name="ldap_port" class="col-lg-8"/>
</div>
<div class="row">
<label for="ldap_user" class="col-lg-4 o_light_label"/>
<field name="ldap_user" class="col-lg-8"/>
</div>
<div class="row">
<label for="ldap_password" class="col-lg-4 o_light_label"/>
<field name="ldap_password" password="True" class="col-lg-8"/>
</div>
<div class="row mt-5">
<div class="col-12">
<h4>Advanced Settings</h4>
</div>
</div>
<div class="row">
<div class="col-12 mt-5 mb-5" style="bachground:#DDDDDD">
The <code>DN</code> part of the contact entry will be
<ol>
<li>
In case of company
<br/>
<code>
dc={company_prefix}-{getattr(company, '{affix_prop}')}
</code>
</li>
<li>
In case of person
<br/>
<code>
dc={person_prefix}-{getattr(person, '{affix_prop}')},dc={person.company.company_prefix}-{getattr(person.company, '{affix_prop}')}
</code>
</li>
</ol>
So <code>affix_prop</code> has to be present in both (<code>id,name,...</code>)
</div>
</div>
<div class="row mt-3">
<label for="company_prefix" class="col-lg-4 o_light_label"/>
<field name="company_prefix" class="col-lg-8"/>
</div>
<div class="row">
<label for="person_prefix" class="col-lg-4 o_light_label"/>
<field name="person_prefix" class="col-lg-8"/>
</div>
<div class="row">
<label for="affix_prop" class="col-lg-4 o_light_label"/>
<field name="affix_prop" class="col-lg-8"/>
</div>
<div class="row mt-5">
<div class="col-12">
<button string="Kontakte neu exportieren"
type="object"
name="button_reexport_ldap"
class="oe_highlight"/>
<div class="text-muted mt-2">
Löscht alle Kontakte im LDAP und exportiert neu
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</flectra>