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,28 +8,31 @@
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<!-- Add fax number on its own row below phone -->
|
||||
<!-- Add fax number on its own row below phone (fax users only) -->
|
||||
<xpath expr="//field[@name='phone']/.." position="after">
|
||||
<div class="d-flex align-items-baseline w-md-50">
|
||||
<div class="d-flex align-items-baseline w-md-50"
|
||||
groups="fusion_faxes.group_fax_user">
|
||||
<i class="fa fa-fw me-1 fa-fax text-primary" title="Fax"/>
|
||||
<field name="x_ff_fax_number" class="w-100" widget="phone"
|
||||
placeholder="Fax number..."/>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<!-- Add smart button for fax count -->
|
||||
<!-- Add smart button for fax count (fax users only) -->
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="action_view_faxes" type="object"
|
||||
class="oe_stat_button" icon="fa-fax"
|
||||
invisible="x_ff_fax_count == 0">
|
||||
invisible="x_ff_fax_count == 0"
|
||||
groups="fusion_faxes.group_fax_user">
|
||||
<field name="x_ff_fax_count" widget="statinfo" string="Faxes"/>
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
<!-- Add Fax History tab -->
|
||||
<!-- Add Fax History tab (fax users only) -->
|
||||
<xpath expr="//page[@name='internal_notes']" position="after">
|
||||
<page string="Fax History" name="fax_history"
|
||||
invisible="x_ff_fax_count == 0">
|
||||
invisible="x_ff_fax_count == 0"
|
||||
groups="fusion_faxes.group_fax_user">
|
||||
<field name="x_ff_fax_ids" readonly="1">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
|
||||
Reference in New Issue
Block a user