Alaguraj0361 dd4e83d2da Add Dine360 Table Reservation Theme Customizer
- Introduced a new module for customizing the Table Reservation theme with primary and secondary branding colors.
- Updated the __manifest__.py to include dependencies and module details.
- Created models for website settings to manage theme colors.
- Added views for configuration settings and menu items for easy access.
- Enhanced reservation templates to apply custom styles dynamically.
- Implemented a verification script to check if the theme is applied correctly.
- Updated docker-compose.yml to change the exposed port for the Odoo service.
2026-07-03 22:52:18 +05:30

118 lines
5.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Tree View -->
<record id="view_saas_restaurant_tree" model="ir.ui.view">
<field name="name">saas.restaurant.tree</field>
<field name="model">saas.restaurant</field>
<field name="arch" type="xml">
<tree string="Restaurants">
<field name="name"/>
<field name="owner_name"/>
<field name="email"/>
<field name="subdomain"/>
<field name="plan_id"/>
<field name="status" widget="badge" decoration-success="status == 'active'" decoration-info="status == 'draft'" decoration-warning="status == 'provisioning'" decoration-danger="status in ['suspended', 'expired', 'failed']"/>
<field name="expiry_date"/>
</tree>
</field>
</record>
<!-- Form View -->
<record id="view_saas_restaurant_form" model="ir.ui.view">
<field name="name">saas.restaurant.form</field>
<field name="model">saas.restaurant</field>
<field name="arch" type="xml">
<form string="Restaurant Tenant">
<header>
<button name="action_create_database" string="Provision Database" type="object" class="oe_highlight" invisible="status not in ['draft', 'failed']"/>
<button name="action_suspend" string="Suspend Subscription" type="object" class="btn-danger" invisible="status != 'active'"/>
<button name="action_activate" string="Activate Subscription" type="object" class="oe_highlight" invisible="status not in ['suspended', 'expired']"/>
<field name="status" widget="statusbar" statusbar_visible="draft,provisioning,active,suspended,expired"/>
</header>
<sheet>
<field name="logo" widget="image" class="oe_avatar" options="{'preview_image': 'logo'}"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" placeholder="Restaurant Name"/>
</h1>
</div>
<group>
<group string="Owner Information">
<field name="owner_name"/>
<field name="email"/>
<field name="phone"/>
</group>
<group string="Address">
<field name="street"/>
<field name="city"/>
<field name="country_id"/>
</group>
</group>
<group>
<group string="Tenant Deployment">
<field name="database_name"/>
<field name="subdomain"/>
<field name="activate_table_reservation"/>
</group>
<group string="Subscription Details">
<field name="plan_id"/>
<field name="billing_cycle"/>
<field name="start_date"/>
<field name="expiry_date"/>
</group>
</group>
<group>
<group string="Localizations">
<field name="currency_id"/>
<field name="timezone"/>
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<!-- Search View -->
<record id="view_saas_restaurant_search" model="ir.ui.view">
<field name="name">saas.restaurant.search</field>
<field name="model">saas.restaurant</field>
<field name="arch" type="xml">
<search string="Search Restaurants">
<field name="name"/>
<field name="owner_name"/>
<field name="email"/>
<field name="subdomain"/>
<filter string="Draft" name="status_draft" domain="[('status', '=', 'draft')]"/>
<filter string="Active" name="status_active" domain="[('status', '=', 'active')]"/>
<filter string="Suspended" name="status_suspended" domain="[('status', '=', 'suspended')]"/>
<filter string="Expired" name="status_expired" domain="[('status', '=', 'expired')]"/>
<group expand="0" string="Group By">
<filter string="Plan" name="group_by_plan" context="{'group_by': 'plan_id'}"/>
<filter string="Status" name="group_by_status" context="{'group_by': 'status'}"/>
</group>
</search>
</field>
</record>
<!-- Action -->
<record id="action_saas_restaurant" model="ir.actions.act_window">
<field name="name">Restaurants</field>
<field name="res_model">saas.restaurant</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_saas_restaurant_search"/>
</record>
<!-- Menuitem -->
<menuitem id="menu_saas_restaurant"
name="Restaurants List"
parent="menu_saas_tenants"
action="action_saas_restaurant"
sequence="10"/>
</odoo>