Files
odoo_source/addons/im_livechat/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

35 lines
1.4 KiB
XML

<?xml version="1.0"?>
<odoo>
<data>
<!-- Update Preferences form !-->
<record id="res_users_form_view_simple_modif" model="ir.ui.view">
<field name="name">res.users.preferences.form.im_livechat</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='tz']" position="after">
<field name="livechat_username" string="Online Chat Name" readonly="0"
attrs="{'invisible': [('share', '=', True)]}"/>
</xpath>
</field>
</record>
<!-- Update user form !-->
<record id="res_users_form_view" model="ir.ui.view">
<field name="name">res.users.form.im_livechat</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='messaging']" position="after">
<group name="livechat" string="Livechat"
attrs="{'invisible': [('share', '=', True)]}">
<field name="livechat_username"/>
</group>
</xpath>
</field>
</record>
</data>
</odoo>