61 lines
3.0 KiB
XML
61 lines
3.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>
|
|
<group string="Dynamic Branding & Theme">
|
|
<field name="brand_logo" widget="image" options="{'size': [0, 90]}"
|
|
help="Upload the brand logo to display in the app toolbar."/>
|
|
<field name="primary_color" placeholder="#C62828"
|
|
help="Primary theme color in Hex (e.g. #C62828)"/>
|
|
<field name="secondary_color" placeholder="#FF8F00"
|
|
help="Secondary theme color in Hex (e.g. #FF8F00)"/>
|
|
<field name="background_color" placeholder="#FAF6EE"
|
|
help="Primary background color in Hex (e.g. #FAF6EE)"/>
|
|
<field name="background_gradient_color" placeholder="#F3EAD3"
|
|
help="Bottom color for background gradient in Hex (e.g. #F3EAD3)"/>
|
|
</group>
|
|
<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>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Singleton server action: calls python method to load config record -->
|
|
<record id="action_mapan_app_config" model="ir.actions.server">
|
|
<field name="name">App Settings</field>
|
|
<field name="model_id" ref="model_mapan_app_config"/>
|
|
<field name="state">code</field>
|
|
<field name="code">
|
|
action = model.action_open_config()
|
|
</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>
|