90 lines
5.6 KiB
XML
90 lines
5.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="res_config_settings_view_form" model="ir.ui.view">
|
|
<field name="name">res.config.settings.view.form.inherit.odoosh</field>
|
|
<field name="model">res.config.settings</field>
|
|
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//block[@name='integration']" position="after">
|
|
<block title="OdooshCN Lab Environments" name="odoosh_settings">
|
|
|
|
<setting id="odoosh_enable" string="Enable sync"
|
|
help="Once on, creating, updating, archiving and deleting users is pushed to OdooshCN in the background.">
|
|
<field name="odoosh_enabled"/>
|
|
</setting>
|
|
|
|
<setting id="odoosh_connection" string="Platform connection" invisible="not odoosh_enabled"
|
|
help="The token is created by an OdooshCN super administrator and stored on the server only. For local testing use http://127.0.0.1:port rather than localhost.">
|
|
<div class="content-group">
|
|
<div class="row mt8">
|
|
<label for="odoosh_base_url" class="col-lg-4 o_light_label"/>
|
|
<field name="odoosh_base_url" placeholder="https://lab.school.edu"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="odoosh_token" class="col-lg-4 o_light_label"/>
|
|
<field name="odoosh_token" password="True" placeholder="Token starting with osh_"/>
|
|
</div>
|
|
<div class="mt8">
|
|
<button name="action_odoosh_test" type="object"
|
|
string="Test connection" class="btn-link" icon="fa-plug"/>
|
|
</div>
|
|
<field name="odoosh_token_set" invisible="1"/>
|
|
</div>
|
|
</setting>
|
|
|
|
<setting id="odoosh_scope" string="How syncing works" invisible="not odoosh_enabled"
|
|
help="It takes effect as soon as the connection above is filled in; there is nothing to set up per user.">
|
|
<div class="text-muted small">
|
|
<div>New user: synced immediately, and its sync switch is turned on</div>
|
|
<div>Updated user: synced when the switch is on, ignored when it is off</div>
|
|
<div>Archived user: the platform account is deactivated</div>
|
|
<div>Deleted user: the platform account is deleted, its environments go to the platform recycle bin</div>
|
|
<div>Role, quotas and menus per user live on the Lab Environment tab of the user form</div>
|
|
<div>Portal users and built-in Odoo accounts are never synced</div>
|
|
</div>
|
|
</setting>
|
|
|
|
<setting id="odoosh_env_defaults" string="Environment defaults" invisible="not odoosh_enabled"
|
|
help="Used when an environment is provisioned automatically. Memory limit times the number of concurrent users should stay below the server memory.">
|
|
<div class="content-group">
|
|
<div class="row mt8">
|
|
<label for="odoosh_tenant" class="col-lg-4 o_light_label"/>
|
|
<field name="odoosh_tenant" placeholder="Empty = the organisation bound to the token"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="odoosh_default_version" class="col-lg-4 o_light_label"/>
|
|
<field name="odoosh_default_version" placeholder="18"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="odoosh_default_lang" class="col-lg-4 o_light_label"/>
|
|
<field name="odoosh_default_lang" placeholder="en_US"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="odoosh_default_mem_mb" class="col-lg-4 o_light_label"/>
|
|
<field name="odoosh_default_mem_mb" placeholder="Empty = platform default"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="odoosh_default_sleep_hours" class="col-lg-4 o_light_label"/>
|
|
<field name="odoosh_default_sleep_hours" placeholder="0 = never sleep"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
|
|
<setting id="odoosh_actions" string="Maintenance" invisible="not odoosh_enabled"
|
|
help="After the first setup, or after changing the defaults, push every existing user once.">
|
|
<div class="mt8">
|
|
<button name="action_odoosh_sync_all" type="object"
|
|
string="Sync all users" class="btn-link" icon="fa-refresh"/>
|
|
<button name="action_odoosh_open_logs" type="object"
|
|
string="Open sync queue" class="btn-link" icon="fa-list"/>
|
|
</div>
|
|
</setting>
|
|
|
|
</block>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|