You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

82 lines
4.3 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Defines the SetupToken view for settings -->
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.inherit.view.onedrive.integration.odoo</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="//div[@name='integration']" position="inside">
<!-- OneDrive settings -->
<div class="col-12 col-lg-6 o_setting_box" id="onedrive">
<div class="o_setting_left_pane">
<field name="is_onedrive_enabled" string="Microsoft OneDrive"/>
</div>
<div class="o_setting_right_pane">
<label for="is_onedrive_enabled"/>
<div class="text-muted">
Synchronize with OneDrive
</div>
</div>
<!-- Client ID -->
<div class="o_setting_right_pane">
<span attrs="{'invisible': [('is_onedrive_enabled', '=', False)]}">
Client ID:
<field name="onedrive_client"
attrs="{'invisible': [('is_onedrive_enabled', '=', False)]}"/>
</span>
</div>
<!-- Client Secret -->
<div class="o_setting_right_pane">
<span attrs="{'invisible': [('is_onedrive_enabled', '=', False)]}">
Client Secret:
<field name="onedrive_client_secret" password="True"
attrs="{'invisible': [('is_onedrive_enabled', '=', False)]}"/>
</span>
</div>
<!-- Tenant ID -->
<div class="o_setting_right_pane">
<span attrs="{'invisible': [('is_onedrive_enabled', '=', False)]}">
Tenant Id:
<field name="onedrive_tenant_id"
attrs="{'invisible': [('is_onedrive_enabled', '=', False)]}"/>
</span>
</div>
<!-- 🔹 Folder Name (user configurable) -->
<div class="o_setting_right_pane">
<span attrs="{'invisible': [('is_onedrive_enabled', '=', False)]}">
Folder Name:
<field name="onedrive_folder_name"
attrs="{'invisible': [('is_onedrive_enabled', '=', False)]}"/>
</span>
</div>
<!-- Setup Token Button -->
<button class="o_setting_right_pane btn btn-link"
name="action_get_onedrive_auth_code" type="object"
attrs="{'invisible': [('is_onedrive_enabled', '=', False)]}">
<i class="fa fa-arrow-right"/> Setup Token
</button>
<!-- Folder ID (auto-fetched) -->
<div class="o_setting_right_pane">
<span attrs="{'invisible': [('is_onedrive_enabled', '=', False)]}">
Folder ID (auto-fetched):
<!-- wrapper constrains width and applies ellipsis -->
<div style="display:block; max-width:520px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; border:1px solid #e6e6e6; padding:6px 8px; border-radius:4px;">
<!-- nolabel keeps UI compact; readonly ensures no editing -->
<field name="onedrive_folder_id" readonly="1" nolabel="1"
widget="char"
style="display:inline-block; width:100%; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;"/>
</div>
</span>
</div>
</div>
</xpath>
</field>
</record>
</odoo>