diff --git a/PRIMARY_COLOR_CHANGES.md b/PRIMARY_COLOR_CHANGES.md index e125dbc..ac844ad 100644 --- a/PRIMARY_COLOR_CHANGES.md +++ b/PRIMARY_COLOR_CHANGES.md @@ -6,7 +6,7 @@ Successfully changed the entire Odoo site's primary color to **#fecd4f** (Golden ## Changes Made ### 1. Created Theme Variables File -**File:** `d:\Odoo\addons\home_dashboard\static\src\css\theme_variables.css` +**File:** `d:\Odoo\addons\dine360_dashboard\static\src\css\theme_variables.css` - Defined CSS custom properties (variables) for the primary color and all variations - Applied primary color to all common Odoo UI elements: - Buttons (primary, save, create) @@ -25,7 +25,7 @@ Successfully changed the entire Odoo site's primary color to **#fecd4f** (Golden - Search bars ### 2. Updated Home Menu CSS -**File:** `d:\Odoo\addons\home_dashboard\static\src\css\home_menu.css` +**File:** `d:\Odoo\addons\dine360_dashboard\static\src\css\home_menu.css` - App card hover effects now use primary color (#fecd4f) - App name hover color changed to primary color - User avatar background uses gradient with primary color @@ -33,11 +33,11 @@ Successfully changed the entire Odoo site's primary color to **#fecd4f** (Golden - AI icon gradient updated to include primary color ### 3. Updated Manifest -**File:** `d:\Odoo\addons\home_dashboard\__manifest__.py` +**File:** `d:\Odoo\addons\dine360_dashboard\__manifest__.py` - Added `theme_variables.css` to assets list (loads first) ### 4. Existing Login Page -**File:** `d:\Odoo\addons\home_dashboard\static\src\css\login_style.css` +**File:** `d:\Odoo\addons\dine360_dashboard\static\src\css\login_style.css` - Already uses #fecd4f in the gradient background - Login button uses gradient from secondary to primary color @@ -69,7 +69,7 @@ Successfully changed the entire Odoo site's primary color to **#fecd4f** (Golden 2. **Update the Module:** ```bash - docker-compose exec odoo odoo -u home_dashboard -d FOODIES-DELIGHT --stop-after-init + docker-compose exec odoo odoo -u dine360_dashboard -d FOODIES-DELIGHT --stop-after-init ``` 3. **Clear Browser Cache:** @@ -92,7 +92,7 @@ After restarting, check these elements for the primary color: ## Customization To change the primary color in the future, simply edit: -`d:\Odoo\addons\home_dashboard\static\src\css\theme_variables.css` +`d:\Odoo\addons\dine360_dashboard\static\src\css\theme_variables.css` Update the `--primary-color` variable at the top of the file: ```css @@ -103,3 +103,4 @@ Update the `--primary-color` variable at the top of the file: ``` Then restart Odoo and clear browser cache. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..0efb770 --- /dev/null +++ b/README.md @@ -0,0 +1,113 @@ +# Dine360 Odoo Addons + +This repository contains custom Odoo 17 addons for the Dine360 Restaurant Suite. It includes a website theme, a custom login/dashboard experience, and a restaurant role-based access module, all bundled by a meta module for one-click install. + +## Stack +- Odoo 17 (Docker) +- Postgres 15 (Docker) +- Addons mounted from `./addons` + +## Services (Docker) +- Odoo: `http://localhost:10001` +- DB: Postgres 15 (`odoo` / `odoo`) + +## Repository Layout +- `addons/` – Odoo addons +- `docker-compose.yml` – Odoo + Postgres stack +- `backup_db.ps1`, `export_odoo.ps1` – Windows helpers +- `inspect_views.py`, `resolve_homepage.py`, etc. – view debugging helpers + +## Addons + +### 1) `dine360_dashboard` +Custom login layout and app-grid dashboard landing page. + +Key features: +- Redirect `/web/login` to `/` after successful login +- Override `/` for authenticated users to show a custom app dashboard +- Custom login page layout and styling + +Key files: +- `addons/dine360_dashboard/controllers/main.py` +- `addons/dine360_dashboard/views/home_template.xml` +- `addons/dine360_dashboard/views/login_templates.xml` +- `addons/dine360_dashboard/views/web_title_template.xml` +- `addons/dine360_dashboard/views/website_logo.xml` +- `addons/dine360_dashboard/static/src/css/*` + +### 2) `dine360_restaurant` +Role-based access control for restaurant staff. + +Roles: +- Admin/Owner, Manager, Cashier, Waiter/Captain, Kitchen (KDS), Store Keeper + +Key files: +- `addons/dine360_restaurant/models/res_users.py` +- `addons/dine360_restaurant/security/*` +- `addons/dine360_restaurant/views/*` + +### 3) `dine360_theme_chennora` +Custom website theme and page content (homepage + contact us). + +Key files: +- `addons/dine360_theme_chennora/views/layout.xml` +- `addons/dine360_theme_chennora/views/pages.xml` +- `addons/dine360_theme_chennora/static/src/scss/*` +- `addons/dine360_theme_chennora/static/src/img/*` + +### 4) `Dine360_Chennora` (meta module) +Install this single module to pull in all required addons. + +Depends on: +- `dine360_dashboard` +- `dine360_restaurant` +- `dine360_theme_chennora` + +## Standard Install / Upgrade + +### Start the stack +```bash +docker-compose up -d +``` + +### Update Apps list +- Apps -> Update Apps List + +### Install the suite (recommended) +- Apps -> search `Dine360 Restaurant Suite` -> Install + +### Upgrade the suite (after code changes) +```bash +docker exec odoo_client1 odoo -u Dine360_Chennora -d chennora_db --db_host db --db_user odoo --db_password odoo --stop-after-init +``` + +### Upgrade a single addon +```bash +docker exec odoo_client1 odoo -u dine360_dashboard -d chennora_db --db_host db --db_user odoo --db_password odoo --stop-after-init +``` + +## Logos (Apps icons) +Place PNGs here (128x128 or 256x256 recommended): +- `addons/Dine360_Chennora/static/description/icon.png` +- `addons/dine360_dashboard/static/description/icon.png` +- `addons/dine360_restaurant/static/description/icon.png` +- `addons/dine360_theme_chennora/static/description/icon.png` + +## Troubleshooting + +### 500 error after view edits +- Upgrade the affected module +- Restart Odoo: `docker-compose restart odoo` +- Hard refresh browser (Ctrl + F5) + +### Old modules still present (home_dashboard, restaurant_management, theme_chennora) +If you renamed modules, uninstall the old ones in Apps to avoid conflicts. + +## Utilities +Helper scripts for view diagnostics and homepage issues: +- `inspect_views.py`, `inspect_views_v2.py` +- `resolve_homepage.py`, `fix_homepage.py`, `force_inherit.py` + +## Notes +- Homepage content is fully overridden in `addons/dine360_theme_chennora/views/pages.xml`. +- If theme changes don’t appear, check for COW (customized) views masking the theme. diff --git a/addons/Dine360_Chennora/__init__.py b/addons/Dine360_Chennora/__init__.py new file mode 100644 index 0000000..5a3e648 --- /dev/null +++ b/addons/Dine360_Chennora/__init__.py @@ -0,0 +1 @@ +# Meta module for Dine360 Chennora diff --git a/addons/Dine360_Chennora/__manifest__.py b/addons/Dine360_Chennora/__manifest__.py new file mode 100644 index 0000000..ed3d0cf --- /dev/null +++ b/addons/Dine360_Chennora/__manifest__.py @@ -0,0 +1,17 @@ +{ + 'name': 'Dine360 Restaurant Suite', + 'version': '1.0.0', + 'license': 'LGPL-3', + 'category': 'Website', + 'summary': 'Installs all Dine360 Restaurant modules', + 'author': 'Dine360', + 'depends': [ + 'dine360_dashboard', + 'dine360_restaurant', + 'dine360_theme_chennora', + ], + 'data': [], + 'installable': True, + 'application': True, +} + diff --git a/addons/Dine360_Chennora/__pycache__/__init__.cpython-310.pyc b/addons/Dine360_Chennora/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..8dd4d94 Binary files /dev/null and b/addons/Dine360_Chennora/__pycache__/__init__.cpython-310.pyc differ diff --git a/addons/Dine360_Chennora/static/description/icon.png b/addons/Dine360_Chennora/static/description/icon.png new file mode 100644 index 0000000..6fe8f76 Binary files /dev/null and b/addons/Dine360_Chennora/static/description/icon.png differ diff --git a/addons/d360_Dashboard.png b/addons/d360_Dashboard.png new file mode 100644 index 0000000..0ece662 Binary files /dev/null and b/addons/d360_Dashboard.png differ diff --git a/addons/d360_Restaurant.png b/addons/d360_Restaurant.png new file mode 100644 index 0000000..3cea669 Binary files /dev/null and b/addons/d360_Restaurant.png differ diff --git a/addons/d360_Theme.png b/addons/d360_Theme.png new file mode 100644 index 0000000..d7b8d4f Binary files /dev/null and b/addons/d360_Theme.png differ diff --git a/addons/d360_logo.png b/addons/d360_logo.png new file mode 100644 index 0000000..6fe8f76 Binary files /dev/null and b/addons/d360_logo.png differ diff --git a/addons/debug_view.py b/addons/debug_view.py index 263c5fc..436c9f5 100644 --- a/addons/debug_view.py +++ b/addons/debug_view.py @@ -24,7 +24,7 @@ try: # Check theme view logic # The theme view should replace website.homepage - theme_view = env.ref('theme_chennora.custom_homepage', raise_if_not_found=False) + theme_view = env.ref('dine360_theme_chennora.custom_homepage', raise_if_not_found=False) if theme_view: print(f"Theme view found: {theme_view.name} (ID: {theme_view.id}, Priority: {theme_view.priority})") # Ensure it's active @@ -37,7 +37,7 @@ try: theme_view.write({'priority': 50}) print(" - Updated priority to 50") else: - print("WARNING: Theme view 'theme_chennora.custom_homepage' not found! Make sure the module is upgraded.") + print("WARNING: Theme view 'dine360_theme_chennora.custom_homepage' not found! Make sure the module is upgraded.") env.cr.commit() print("--- FIX COMPLETE ---") @@ -45,3 +45,4 @@ except Exception as e: print(f"ERROR: {e}") import traceback traceback.print_exc() + diff --git a/addons/dine360_dashboard/__init__.py b/addons/dine360_dashboard/__init__.py new file mode 100644 index 0000000..991d9d3 --- /dev/null +++ b/addons/dine360_dashboard/__init__.py @@ -0,0 +1,3 @@ +# dine360_dashboard/__init__.py +from . import controllers + diff --git a/addons/home_dashboard/__manifest__.py b/addons/dine360_dashboard/__manifest__.py similarity index 51% rename from addons/home_dashboard/__manifest__.py rename to addons/dine360_dashboard/__manifest__.py index ef78249..c1b8bc4 100644 --- a/addons/home_dashboard/__manifest__.py +++ b/addons/dine360_dashboard/__manifest__.py @@ -1,5 +1,5 @@ { - 'name': 'home_dashboard', + 'name': 'Dine360 Dashboard', 'version': '1.0.1', 'license': 'LGPL-3', 'category': 'Website', @@ -14,23 +14,23 @@ ], 'assets': { 'web.assets_backend': [ - 'home_dashboard/static/src/css/theme_variables.css', - 'home_dashboard/static/src/css/home_menu.css', - 'home_dashboard/static/src/js/chennora_title.js', + 'dine360_dashboard/static/src/css/theme_variables.css', + 'dine360_dashboard/static/src/css/home_menu.css', + 'dine360_dashboard/static/src/js/chennora_title.js', ], 'web.assets_frontend': [ - 'home_dashboard/static/src/css/theme_variables.css', - 'home_dashboard/static/src/css/login_style.css', - 'home_dashboard/static/src/css/website_style.css', - 'home_dashboard/static/src/css/shop_style.css', + 'dine360_dashboard/static/src/css/theme_variables.css', + 'dine360_dashboard/static/src/css/login_style.css', + 'dine360_dashboard/static/src/css/website_style.css', + 'dine360_dashboard/static/src/css/shop_style.css', ], 'web.assets_common': [ - 'home_dashboard/static/src/css/theme_variables.css', + 'dine360_dashboard/static/src/css/theme_variables.css', ], 'point_of_sale._assets_pos': [ - 'home_dashboard/static/src/css/pos_style.css', + 'dine360_dashboard/static/src/css/pos_style.css', ], }, 'installable': True, 'application': True, -} \ No newline at end of file +} diff --git a/addons/dine360_dashboard/__pycache__/__init__.cpython-310.pyc b/addons/dine360_dashboard/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..7b77e4b Binary files /dev/null and b/addons/dine360_dashboard/__pycache__/__init__.cpython-310.pyc differ diff --git a/addons/dine360_dashboard/controllers/__init__.py b/addons/dine360_dashboard/controllers/__init__.py new file mode 100644 index 0000000..e402e9d --- /dev/null +++ b/addons/dine360_dashboard/controllers/__init__.py @@ -0,0 +1,4 @@ +# dine360_dashboard/controllers/__init__.py +from . import main +from . import cors + diff --git a/addons/dine360_dashboard/controllers/__pycache__/__init__.cpython-310.pyc b/addons/dine360_dashboard/controllers/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..748d0c2 Binary files /dev/null and b/addons/dine360_dashboard/controllers/__pycache__/__init__.cpython-310.pyc differ diff --git a/addons/home_dashboard/controllers/__pycache__/cors.cpython-310.pyc b/addons/dine360_dashboard/controllers/__pycache__/cors.cpython-310.pyc similarity index 50% rename from addons/home_dashboard/controllers/__pycache__/cors.cpython-310.pyc rename to addons/dine360_dashboard/controllers/__pycache__/cors.cpython-310.pyc index 3da6849..b985205 100644 Binary files a/addons/home_dashboard/controllers/__pycache__/cors.cpython-310.pyc and b/addons/dine360_dashboard/controllers/__pycache__/cors.cpython-310.pyc differ diff --git a/addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc b/addons/dine360_dashboard/controllers/__pycache__/main.cpython-310.pyc similarity index 72% rename from addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc rename to addons/dine360_dashboard/controllers/__pycache__/main.cpython-310.pyc index 245d943..ce43cf7 100644 Binary files a/addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc and b/addons/dine360_dashboard/controllers/__pycache__/main.cpython-310.pyc differ diff --git a/addons/home_dashboard/controllers/cors.py b/addons/dine360_dashboard/controllers/cors.py similarity index 100% rename from addons/home_dashboard/controllers/cors.py rename to addons/dine360_dashboard/controllers/cors.py diff --git a/addons/home_dashboard/controllers/main.py b/addons/dine360_dashboard/controllers/main.py similarity index 89% rename from addons/home_dashboard/controllers/main.py rename to addons/dine360_dashboard/controllers/main.py index f0dc179..153def4 100644 --- a/addons/home_dashboard/controllers/main.py +++ b/addons/dine360_dashboard/controllers/main.py @@ -20,7 +20,7 @@ class ImageHome(Website): ('parent_id', '=', False) ], order='sequence') - return request.render('home_dashboard.image_home_template', { + return request.render('dine360_dashboard.image_home_template', { 'menus': menus, 'user_id': request.env.user }) @@ -28,4 +28,4 @@ class ImageHome(Website): @http.route('/home', type='http', auth="public", website=True, sitemap=True) def website_home(self, **kw): # Explicit route for standard Website Homepage - return request.render('website.homepage') \ No newline at end of file + return request.render('website.homepage') diff --git a/addons/dine360_dashboard/static/description/icon.png b/addons/dine360_dashboard/static/description/icon.png new file mode 100644 index 0000000..0ece662 Binary files /dev/null and b/addons/dine360_dashboard/static/description/icon.png differ diff --git a/addons/home_dashboard/static/src/css/home_menu.css b/addons/dine360_dashboard/static/src/css/home_menu.css similarity index 100% rename from addons/home_dashboard/static/src/css/home_menu.css rename to addons/dine360_dashboard/static/src/css/home_menu.css diff --git a/addons/home_dashboard/static/src/css/login_style.css b/addons/dine360_dashboard/static/src/css/login_style.css similarity index 95% rename from addons/home_dashboard/static/src/css/login_style.css rename to addons/dine360_dashboard/static/src/css/login_style.css index 3114c60..649bcc1 100644 --- a/addons/home_dashboard/static/src/css/login_style.css +++ b/addons/dine360_dashboard/static/src/css/login_style.css @@ -5,7 +5,7 @@ width: 100vw !important; overflow: hidden; background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), - url('/home_dashboard/static/src/img/login_bg.png') no-repeat center center !important; + url('/dine360_dashboard/static/src/img/login_bg.png') no-repeat center center !important; background-size: cover !important; } @@ -19,7 +19,7 @@ position: relative; /* Dark overlay on image for text readability */ /* background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), - url('/home_dashboard/static/src/img/login_bg.png') no-repeat center center !important; + url('/dine360_dashboard/static/src/img/login_bg.png') no-repeat center center !important; background-size: cover !important; */ color: white !important; } @@ -238,7 +238,7 @@ body.o_custom_login_body .o_login_main_wrapper { /* width: 100vw !important; */ overflow: hidden !important; background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), - url('/home_dashboard/static/src/img/login_bg.png') no-repeat center center !important; + url('/dine360_dashboard/static/src/img/login_bg.png') no-repeat center center !important; background-size: cover !important; color: white !important; } @@ -256,4 +256,4 @@ body.o_custom_login_body .o_login_main_wrapper { border: 1px solid rgba(255, 255, 255, 0.1) !important; z-index: 2; max-width: 400px; -} \ No newline at end of file +} diff --git a/addons/home_dashboard/static/src/css/pos_style.css b/addons/dine360_dashboard/static/src/css/pos_style.css similarity index 100% rename from addons/home_dashboard/static/src/css/pos_style.css rename to addons/dine360_dashboard/static/src/css/pos_style.css diff --git a/addons/home_dashboard/static/src/css/shop_style.css b/addons/dine360_dashboard/static/src/css/shop_style.css similarity index 100% rename from addons/home_dashboard/static/src/css/shop_style.css rename to addons/dine360_dashboard/static/src/css/shop_style.css diff --git a/addons/home_dashboard/static/src/css/theme_variables.css b/addons/dine360_dashboard/static/src/css/theme_variables.css similarity index 100% rename from addons/home_dashboard/static/src/css/theme_variables.css rename to addons/dine360_dashboard/static/src/css/theme_variables.css diff --git a/addons/home_dashboard/static/src/css/website_style.css b/addons/dine360_dashboard/static/src/css/website_style.css similarity index 100% rename from addons/home_dashboard/static/src/css/website_style.css rename to addons/dine360_dashboard/static/src/css/website_style.css diff --git a/addons/home_dashboard/static/src/img/login_bg.png b/addons/dine360_dashboard/static/src/img/login_bg.png similarity index 100% rename from addons/home_dashboard/static/src/img/login_bg.png rename to addons/dine360_dashboard/static/src/img/login_bg.png diff --git a/addons/home_dashboard/static/src/js/chennora_title.js b/addons/dine360_dashboard/static/src/js/chennora_title.js similarity index 100% rename from addons/home_dashboard/static/src/js/chennora_title.js rename to addons/dine360_dashboard/static/src/js/chennora_title.js diff --git a/addons/home_dashboard/views/home_template.xml b/addons/dine360_dashboard/views/home_template.xml similarity index 97% rename from addons/home_dashboard/views/home_template.xml rename to addons/dine360_dashboard/views/home_template.xml index 585c493..78bed71 100644 --- a/addons/home_dashboard/views/home_template.xml +++ b/addons/dine360_dashboard/views/home_template.xml @@ -3,7 +3,7 @@ - +
@@ -77,3 +77,4 @@ + diff --git a/addons/home_dashboard/views/login_templates.xml b/addons/dine360_dashboard/views/login_templates.xml similarity index 91% rename from addons/home_dashboard/views/login_templates.xml rename to addons/dine360_dashboard/views/login_templates.xml index 2e7e117..e61c752 100644 --- a/addons/home_dashboard/views/login_templates.xml +++ b/addons/dine360_dashboard/views/login_templates.xml @@ -5,11 +5,11 @@ - + - +