Files
odoo_source/addons/mail_bot/views/res_users_views.xml
T
Juhil Somaiya 02eebe15cd [IMP] mail_bot: Blocked notification alert to User
If user has blocked odoo push notifications
then there's no way to enable via the OdooBot notification in the systray as it depends on the navigator
so display the alert message under users preference section.

Related Task ID: 1929547

closes odoo/odoo#30496
2019-02-15 09:05:54 +00:00

44 lines
1.7 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"/>
</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="alias_contact" position="after">
<field name="odoobot_state" readonly="0" groups="base.group_no_one"/>
</field>
</data>
</field>
</record>
<!-- Blocked notification alert -->
<record id="view_users_form_inherit_mail_notification_alert" model="ir.ui.view">
<field name="name">res.users.preferences.form.notification.alert</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='image']" position="before">
<widget name="notification_alert"/>
</xpath>
</field>
</record>
</data></odoo>