Users without fax/RC groups could not open Sale Orders, Invoices, or Contacts because the One2many computed fields triggered AccessError on fusion.fax. Now base.group_user gets read-only access so computed fields work silently, while all UI elements (smart buttons, header buttons, menus, partner fields, settings) are restricted to the proper security groups. Both modules now use Odoo 19 privilege pattern for the user settings dropdown. Co-authored-by: Cursor <cursoragent@cursor.com>
50 lines
2.4 KiB
XML
50 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- Add RingCentral calls tab and smart button to contact form -->
|
|
<record id="view_partner_form_inherit_rc" model="ir.ui.view">
|
|
<field name="name">res.partner.form.inherit.fusion_ringcentral</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
|
<field name="arch" type="xml">
|
|
|
|
<!-- Smart button for call count (RC users only) -->
|
|
<xpath expr="//div[@name='button_box']" position="inside">
|
|
<button name="action_view_rc_calls" type="object"
|
|
class="oe_stat_button" icon="fa-phone"
|
|
invisible="rc_call_count == 0"
|
|
groups="fusion_ringcentral.group_rc_user">
|
|
<field name="rc_call_count" widget="statinfo" string="Calls"/>
|
|
</button>
|
|
</xpath>
|
|
|
|
<!-- RingCentral Calls tab (RC users only) -->
|
|
<xpath expr="//page[@name='internal_notes']" position="after">
|
|
<page string="RingCentral Calls" name="rc_calls"
|
|
invisible="rc_call_count == 0"
|
|
groups="fusion_ringcentral.group_rc_user">
|
|
<field name="rc_call_ids" readonly="1">
|
|
<list decoration-danger="status in ('missed', 'no_answer')"
|
|
decoration-success="status == 'answered'">
|
|
<field name="name"/>
|
|
<field name="direction" widget="badge"
|
|
decoration-info="direction == 'outbound'"
|
|
decoration-success="direction == 'inbound'"/>
|
|
<field name="start_time"/>
|
|
<field name="from_number"/>
|
|
<field name="to_number"/>
|
|
<field name="duration_display" string="Duration"/>
|
|
<field name="status" widget="badge"
|
|
decoration-success="status == 'answered'"
|
|
decoration-danger="status in ('missed', 'no_answer')"/>
|
|
<field name="has_recording" string="Rec" widget="boolean"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
</xpath>
|
|
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|