mapan_loyalty_push/wizard/push_wizard_views.xml

57 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_mapan_push_wizard_form" model="ir.ui.view">
<field name="name">mapan.push.wizard.form</field>
<field name="model">mapan.push.wizard</field>
<field name="arch" type="xml">
<form string="Send Push Notification">
<group>
<field name="title"/>
<field name="body"/>
<field name="image" widget="image" options="{'size': [0, 200]}"
help="Optional promotional image (JPG/PNG). Displayed in the notification detail screen."/>
<field name="recipient_type" widget="radio" options="{'horizontal': true}"/>
</group>
<group string="Recipients" invisible="recipient_type != 'specific'">
<field name="partner_ids" widget="many2many_tags" placeholder="Select customers who activated their account..." options="{'no_create': True, 'no_open': True}"/>
</group>
<footer>
<button name="action_send_push" type="object" string="Send Notification" class="btn-primary" icon="fa-paper-plane"/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_mapan_push_wizard" model="ir.actions.act_window">
<field name="name">Send Push Notification</field>
<field name="res_model">mapan.push.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<!-- Top Level App Menu -->
<menuitem id="menu_mapan_mobile_app_root"
name="Mobile App"
web_icon="mapan_loyalty_push,static/description/icon.png"
groups="mapan_loyalty_push.group_mapan_loyalty_push_user"
sequence="50"/>
<!-- Action Menu inside the App -->
<menuitem id="menu_mapan_push_wizard"
name="Send Push Notification"
parent="menu_mapan_mobile_app_root"
action="action_mapan_push_wizard"
groups="mapan_loyalty_push.group_mapan_loyalty_push_manager"
sequence="20"/>
<!-- Explicit Menu Overrides to clear and reset group_ids in Database -->
<record id="menu_mapan_mobile_app_root" model="ir.ui.menu">
<field name="group_ids" eval="[(6, 0, [ref('mapan_loyalty_push.group_mapan_loyalty_push_user')])]"/>
</record>
<record id="menu_mapan_push_wizard" model="ir.ui.menu">
<field name="group_ids" eval="[(6, 0, [ref('mapan_loyalty_push.group_mapan_loyalty_push_manager')])]"/>
</record>
</odoo>