fix: comprehensive permission overhaul for fusion_faxes and fusion_ringcentral
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>
This commit is contained in:
@@ -8,34 +8,39 @@
|
||||
<field name="inherit_id" ref="fusion_faxes.view_fusion_fax_form"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<!-- Add Forward and Send New buttons to header -->
|
||||
<!-- Add Forward and Send New buttons to header (RC users only) -->
|
||||
<xpath expr="//button[@name='action_resend']" position="after">
|
||||
<button name="action_forward_fax" string="Forward Fax"
|
||||
type="object" class="btn-secondary"
|
||||
icon="fa-share"
|
||||
invisible="direction != 'inbound' or state != 'received'"/>
|
||||
invisible="direction != 'inbound' or state != 'received'"
|
||||
groups="fusion_ringcentral.group_rc_user"/>
|
||||
<button name="action_send_new_fax" string="Send New Fax"
|
||||
type="object" class="btn-secondary"
|
||||
icon="fa-fax"/>
|
||||
icon="fa-fax"
|
||||
groups="fusion_ringcentral.group_rc_user"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Add Contact, Sales Orders, Invoices smart buttons -->
|
||||
<!-- Add Contact, Sales Orders, Invoices smart buttons (RC users only) -->
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="action_view_contact" type="object"
|
||||
class="oe_stat_button" icon="fa-user"
|
||||
invisible="not partner_id">
|
||||
invisible="not partner_id"
|
||||
groups="fusion_ringcentral.group_rc_user">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text"><field name="partner_id" readonly="1" nolabel="1" class="o_text_overflow"/></span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_sale_orders" type="object"
|
||||
class="oe_stat_button" icon="fa-shopping-cart"
|
||||
invisible="not partner_id">
|
||||
invisible="not partner_id"
|
||||
groups="fusion_ringcentral.group_rc_user">
|
||||
<field name="sale_order_count" widget="statinfo" string="Sales Orders"/>
|
||||
</button>
|
||||
<button name="action_view_invoices" type="object"
|
||||
class="oe_stat_button" icon="fa-file-text-o"
|
||||
invisible="not partner_id">
|
||||
invisible="not partner_id"
|
||||
groups="fusion_ringcentral.group_rc_user">
|
||||
<field name="invoice_count" widget="statinfo" string="Invoices"/>
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user