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

33 lines
1.3 KiB
XML

<?xml version="1.0"?>
<odoo><data>
<!-- Update Preferences form !-->
<record id="res_users_view_form_preferences" model="ir.ui.view">
<field name="name">res.users.view.form.preferences.mail_bot</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="mail.view_users_form_simple_modif_mail"/>
<field name="arch" type="xml">
<data>
<field name="notification_type" position="after">
<field name="odoobot_state" readonly="0" groups="base.group_no_one"
attrs="{'invisible': [('share', '=', True)]}"/>
</field>
</data>
</field>
</record>
<!-- Update user form !-->
<record id="res_users_view_form" model="ir.ui.view">
<field name="name">res.users.view.form.mail_bot</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="mail.view_users_form_mail"/>
<field name="arch" type="xml">
<data>
<field name="signature" position="before">
<field name="odoobot_state" readonly="0" groups="base.group_no_one"
attrs="{'invisible': [('share', '=', True)]}"/>
</field>
</data>
</field>
</record>
</data></odoo>