Files
odoo_source/addons/mail/views/res_users_views.xml
T
std-odooandnounoubensebia cd8e0e9f46 [IMP] base, *: hide non-relevant fields for portal users
Purpose
=======
Hide non-relevant fields for a portal user. E.G. we want to hide the
notification type,  the menu customization... Because those fields
make no sense for a portal user.

Force the non-internal user to receive notifications by emails since
they can not open Discuss.

Task-2508521

Part-of: odoo/odoo#77766
Co-authored-by: nounoubensebia <neb@odoo.com>
2021-11-09 14:45:49 +00:00

38 lines
1.5 KiB
XML

<?xml version="1.0"?>
<odoo>
<data>
<!-- Update Preferences form !-->
<record id="view_users_form_simple_modif_mail" model="ir.ui.view">
<field name="name">res.users.preferences.form.mail</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<data>
<field name="email" position="before">
<field name="notification_type" widget="radio" readonly="0"/>
</field>
<xpath expr="//field[@name='image_1920']" position="before">
<widget name="notification_alert"/>
</xpath>
</data>
</field>
</record>
<!-- Update user form !-->
<record id="view_users_form_mail" model="ir.ui.view">
<field name="name">res.users.form.mail</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<data>
<field name="signature" position="before">
<field name="notification_type" widget="radio"
attrs="{'invisible': [('share', '=', True)]}"/>
</field>
</data>
</field>
</record>
</data>
</odoo>