mapan_loyalty_push/views/app_cms_config_views.xml

47 lines
2.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Form View (singleton-style) -->
<record id="view_mapan_app_config_form" model="ir.ui.view">
<field name="name">mapan.app.config.form</field>
<field name="model">mapan.app.config</field>
<field name="arch" type="xml">
<form string="App Settings">
<sheet>
<div class="oe_title">
<h1>Mobile App Settings</h1>
</div>
<group string="Account Menu Links">
<field name="about_us_url"
placeholder="https://yourwebsite.com/about"
help="URL opened when the user taps About Us in the app."/>
<field name="contact_us_url"
placeholder="https://yourwebsite.com/contact"
help="URL opened when the user taps Contact Us in the app."/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Singleton action: always opens the single config record -->
<record id="action_mapan_app_config" model="ir.actions.act_window">
<field name="name">App Settings</field>
<field name="res_model">mapan.app.config</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
<!-- Open existing record if it exists -->
<field name="domain">[]</field>
</record>
<menuitem id="menu_mapan_app_config"
name="App Settings"
parent="menu_mapan_mobile_app_root"
action="action_mapan_app_config"
groups="mapan_loyalty_push.group_mapan_loyalty_push_manager"
sequence="50"/>
<record id="menu_mapan_app_config" model="ir.ui.menu">
<field name="group_ids" eval="[(6, 0, [ref('mapan_loyalty_push.group_mapan_loyalty_push_manager')])]"/>
</record>
</odoo>