mapan_loyalty_push/views/app_promo_views.xml

81 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- List View -->
<record id="view_mapan_app_promo_tree" model="ir.ui.view">
<field name="name">mapan.app.promo.tree</field>
<field name="model">mapan.app.promo</field>
<field name="arch" type="xml">
<list string="Promo Highlights" editable="top">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="image" widget="image" options="{'size': [48, 48]}"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="is_active"/>
</list>
</field>
</record>
<!-- Form View -->
<record id="view_mapan_app_promo_form" model="ir.ui.view">
<field name="name">mapan.app.promo.form</field>
<field name="model">mapan.app.promo</field>
<field name="arch" type="xml">
<form string="Promo Highlight">
<sheet>
<field name="image" widget="image" options="{'size': [0, 180]}"
class="oe_avatar" style="max-width:200px"/>
<div class="oe_title">
<h1>
<field name="name" placeholder="Promo Title"/>
</h1>
</div>
<group>
<group>
<field name="sequence"/>
<field name="is_active"/>
</group>
<group>
<field name="date_start"/>
<field name="date_end"/>
</group>
</group>
<notebook>
<page string="Detail Content">
<field name="body" widget="html"
placeholder="Enter the promo detail content shown when the user taps this card..."/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Action -->
<record id="action_mapan_app_promo" model="ir.actions.act_window">
<field name="name">Promo Highlights</field>
<field name="res_model">mapan.app.promo</field>
<field name="view_mode">list,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
No promo highlights yet!
</p>
<p>
Add promo items to display below the carousel on the app home screen.
Users can tap a promo to read the full detail.
</p>
</field>
</record>
<menuitem id="menu_mapan_app_promo"
name="Promo Highlights"
parent="menu_mapan_mobile_app_root"
action="action_mapan_app_promo"
groups="mapan_loyalty_push.group_mapan_loyalty_push_manager"
sequence="40"/>
<record id="menu_mapan_app_promo" model="ir.ui.menu">
<field name="group_ids" eval="[(6, 0, [ref('mapan_loyalty_push.group_mapan_loyalty_push_manager')])]"/>
</record>
</odoo>