- 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.
22 lines
810 B
Python
22 lines
810 B
Python
# -*- coding: utf-8 -*-
|
|
from odoo import models, fields
|
|
|
|
class Website(models.Model):
|
|
_inherit = 'website'
|
|
|
|
is_reservation_theme_active = fields.Boolean(
|
|
string='Activate Custom Reservation Theme',
|
|
default=True,
|
|
help='If checked, applies custom primary and secondary colors to the Table Reservation page.'
|
|
)
|
|
reservation_primary_color = fields.Char(
|
|
string='Reservation Primary Color',
|
|
default='#fecd4f',
|
|
help='Primary accent color used for headers, buttons, borders, highlights, and active/selected states.'
|
|
)
|
|
reservation_secondary_color = fields.Char(
|
|
string='Reservation Secondary Color',
|
|
default='#171422',
|
|
help='Secondary color used for text within buttons and other components to ensure high contrast.'
|
|
)
|