Skip to content
Snippets Groups Projects
Commit fea08271 authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[IMP] mail: add views for mail.notification model


Somehow having views could be necessary. Previously the only way to see
notifications was embedded inside mail.message views (notification_ids).

Task 2118599
PR #39460

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 65dc880f
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@
'wizard/mail_resend_message_views.xml',
'views/mail_message_subtype_views.xml',
'views/mail_tracking_views.xml',
'views/mail_notification_views.xml',
'views/mail_message_views.xml',
'views/mail_mail_views.xml',
'views/mail_followers_views.xml',
......
<?xml version="1.0"?>
<odoo><data>
<record id="mail_notification_view_tree" model="ir.ui.view">
<field name="name">mail.notification.view.tree</field>
<field name="model">mail.notification</field>
<field name="arch" type="xml">
<tree string="Notifications">
<field name="mail_message_id"/>
<field name="notification_type"/>
<field name="res_partner_id"/>
<field name="is_read"/>
<field name="failure_type"/>
</tree>
</field>
</record>
<record id="mail_notification_view_form" model="ir.ui.view">
<field name="name">mail.notification.view.form</field>
<field name="model">mail.notification</field>
<field name="arch" type="xml">
<form string="Notification">
<header>
<field name="notification_status" widget="statusbar"/>
</header>
<sheet>
<group>
<group string="Source">
<field name="mail_message_id"/>
<field name="notification_type"/>
<field name="mail_id"/>
<field name="res_partner_id"/>
</group>
<group string="Status">
<field name="is_read"/>
<field name="read_date"/>
<field name="failure_type"/>
<field name="failure_reason"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="mail_notification_action" model="ir.actions.act_window">
<field name="name">Notifications</field>
<field name="res_model">mail.notification</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Notifications"
id="mail_notification_menu"
parent="mail.mail_menu_technical"
action="mail_notification_action"
sequence="30"
groups="base.group_no_one"/>
</data></odoo>
......@@ -19,6 +19,7 @@ The service is provided by the In App Purchase Odoo platform.
'wizard/sms_template_preview_views.xml',
'wizard/sms_resend_views.xml',
'views/ir_actions_views.xml',
'views/mail_notification_views.xml',
'views/res_config_settings_views.xml',
'views/res_partner_views.xml',
'views/assets.xml',
......
<?xml version="1.0"?>
<odoo><data>
<record id="mail_notification_view_tree" model="ir.ui.view">
<field name="name">mail.notification.view.tree</field>
<field name="model">mail.notification</field>
<field name="inherit_id" ref="mail.mail_notification_view_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='res_partner_id']" position="after">
<field name="sms_number"/>
</xpath>
</field>
</record>
<record id="mail_notification_view_form" model="ir.ui.view">
<field name="name">mail.notification.view.form</field>
<field name="model">mail.notification</field>
<field name="inherit_id" ref="mail.mail_notification_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='res_partner_id']" position="after">
<field name="sms_number"/>
</xpath>
<xpath expr="//field[@name='mail_id']" position="after">
<field name="sms_id"/>
</xpath>
</field>
</record>
</data></odoo>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment