mapan_loyalty_push/views/app_notification_views.xml

70 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Tree View -->
<record id="view_mapan_app_notification_tree" model="ir.ui.view">
<field name="name">mapan.app.notification.tree</field>
<field name="model">mapan.app.notification</field>
<field name="arch" type="xml">
<tree string="App Notifications" default_order="create_date desc" create="false" edit="false" delete="false">
<field name="create_date" string="Sent On"/>
<field name="title"/>
<field name="body"/>
<field name="is_global"/>
</tree>
</field>
</record>
<!-- Form View -->
<record id="view_mapan_app_notification_form" model="ir.ui.view">
<field name="name">mapan.app.notification.form</field>
<field name="model">mapan.app.notification</field>
<field name="arch" type="xml">
<form string="App Notification" create="false" edit="false" delete="false">
<sheet>
<div class="oe_title">
<h1>
<field name="title" readonly="1"/>
</h1>
</div>
<group>
<group>
<field name="is_global" readonly="1"/>
</group>
<group>
<field name="create_date" string="Sent On" readonly="1"/>
</group>
</group>
<group>
<field name="body" readonly="1"/>
</group>
<group string="Sent To" invisible="is_global == True">
<field name="partner_ids" widget="many2many_tags" readonly="1" nolabel="1"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Action -->
<record id="action_mapan_app_notification_history" model="ir.actions.act_window">
<field name="name">Notification History</field>
<field name="res_model">mapan.app.notification</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
No notifications sent yet!
</p>
<p>
Use the "Send Push Notification" wizard to broadcast messages to your loyalty app users.
</p>
</field>
</record>
<!-- Menu Item (Ties to the Mobile App Root Menu) -->
<menuitem id="menu_mapan_app_notification_history"
name="History"
parent="menu_mapan_mobile_app_root"
action="action_mapan_app_notification_history"
sequence="20"/>
</odoo>