feat: Add app notification history views and module icon.

This commit is contained in:
Suherdy Yacob 2026-03-26 08:29:51 +07:00
parent 8beebd2cfc
commit f35643c493
3 changed files with 70 additions and 0 deletions

View File

@ -14,6 +14,7 @@
'security/ir.model.access.csv', 'security/ir.model.access.csv',
'wizard/push_wizard_views.xml', 'wizard/push_wizard_views.xml',
'views/res_partner_views.xml', 'views/res_partner_views.xml',
'views/app_notification_views.xml',
], ],
'installable': True, 'installable': True,
'application': False, 'application': False,

BIN
static/description/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,69 @@
<?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>