This commit is contained in:
gsinghpal
2026-02-22 01:37:50 -05:00
parent 5200d5baf0
commit d6bac8e623
1550 changed files with 263540 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Add RingCentral Authorization ID to user VoIP settings (admin view) -->
<record id="res_users_form_inherit_rc" model="ir.ui.view">
<field name="name">res.users.form.inherit.voip_ringcentral</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="voip.res_user_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='voip_secret']" position="after">
<field name="rc_authorization_id" readonly="1"
string="RC Auth ID"
invisible="not voip_provider_id"/>
</xpath>
</field>
</record>
<!-- Add to preferences form too -->
<record id="res_users_prefs_form_inherit_rc" model="ir.ui.view">
<field name="name">res.users.prefs.form.inherit.voip_ringcentral</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="voip.res_users_view_form_preferences"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='voip_secret']" position="after">
<field name="rc_authorization_id" readonly="1"
string="RC Auth ID"
invisible="not voip_provider_id"/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Extend VoIP Provider form to add RingCentral credentials and Provision button -->
<record id="voip_provider_view_form_inherit_rc" model="ir.ui.view">
<field name="name">voip.provider.form.inherit.ringcentral</field>
<field name="model">voip.provider</field>
<field name="inherit_id" ref="voip.voip_provider_view_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet" position="inside">
<separator string="RingCentral Integration"/>
<group>
<group>
<field name="rc_client_id" placeholder="Client ID from RingCentral Developer Console"/>
<field name="rc_client_secret" password="True"
placeholder="Client Secret"/>
</group>
<group>
<field name="rc_jwt_token" password="True"
placeholder="JWT Token from RingCentral Credentials"/>
<field name="rc_server_url"
placeholder="https://platform.ringcentral.com"/>
</group>
</group>
<group invisible="not rc_device_id">
<group>
<field name="rc_device_id"/>
</group>
<group>
<div class="text-muted small">
Find this device in RingCentral Admin Portal under
Phones &amp; Devices to configure its outbound Caller ID.
</div>
</group>
</group>
<div class="mt-2 mb-4">
<button name="action_provision_sip" type="object"
string="Provision SIP Credentials"
class="btn-primary"
icon="fa-plug"
confirm="This will fetch SIP credentials from RingCentral and auto-configure the provider and your user settings. Continue?"/>
<span class="text-muted ms-3">
Fetches WSS endpoint, SIP domain, username, password, and authorization ID from RingCentral.
</span>
</div>
</xpath>
</field>
</record>
<!-- Override list view: remove editable so clicking opens form view -->
<record id="voip_provider_list_inherit_rc" model="ir.ui.view">
<field name="name">voip.provider.list.inherit.ringcentral</field>
<field name="model">voip.provider</field>
<field name="inherit_id" ref="voip.voip_provider_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//list" position="attributes">
<attribute name="editable"/>
</xpath>
<xpath expr="//field[@name='mode']" position="after">
<field name="rc_client_id" optional="hide" string="RC Client ID"/>
</xpath>
</field>
</record>
</odoo>