Files
odoo_source/addons/mail_bot_hr/views/res_users_views.xml
T
Hiral Bhavsar 9b8f1d4236 [FIX] mail_bot_hr: preferences warning duplication
Before this commit:

Once the push notifications have been blocked, click on 'My Profile' displaying
preferences warning twice with a different place inside the form after https://github.com/odoo/odoo/commit/328f6dbc984312049e94413fe9a46284cffcb3cb

After this commit:

A preferences warning will be displayed at the proper place by removing the
primary mode from inherited view and add priority to it.

LINKS

Task-2323263

closes odoo/odoo#56218

X-original-commit: 9983914e2ddc60f6bb55a97a6b6e15e1f9d940d4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-20 13:34:16 +00:00

29 lines
1.2 KiB
XML

<?xml version="1.0" ?>
<odoo>
<data>
<record id="res_users_view_form_simple_modif" model="ir.ui.view">
<field name="name">res.users.preferences.form.simplified.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="hr.res_users_view_form_simple_modif" />
<field name="priority">15</field>
<field name="arch" type="xml">
<widget name="notification_alert" position="replace" />
</field>
</record>
<record id="res_users_view_form_profile" model="ir.ui.view">
<field name="name">res.users.preferences.form.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="hr.res_users_view_form_profile" />
<field name="arch" type="xml">
<xpath expr="//field[@name='odoobot_state']" position="attributes">
<attribute name="attrs">{'readonly': [('can_edit', '=', False)]}</attribute>
</xpath>
<sheet position="before">
<widget name="notification_alert" class="mb-0" />
</sheet>
</field>
</record>
</data>
</odoo>