diff --git a/README.md b/README.md index 0bc12b1..cb2d307 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Dine360 Odoo Addons_New by mohan1 +# Dine360 Odoo Addons_New by mohan1 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. @@ -46,22 +46,22 @@ Key files: - `addons/dine360_restaurant/security/*` - `addons/dine360_restaurant/views/*` -### 3) `dine360_theme_chennora` +### 3) `dine360_theme_shivasakthi` 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/*` +- `addons/dine360_theme_shivasakthi/views/layout.xml` +- `addons/dine360_theme_shivasakthi/views/pages.xml` +- `addons/dine360_theme_shivasakthi/static/src/scss/*` +- `addons/dine360_theme_shivasakthi/static/src/img/*` -### 4) `Dine360_Chennora` (meta module) +### 4) `Dine360_Shivasakthi` (meta module) Install this single module to pull in all required addons. Depends on: - `dine360_dashboard` - `dine360_restaurant` -- `dine360_theme_chennora` +- `dine360_theme_shivasakthi` ## Standard Install / Upgrade @@ -78,20 +78,20 @@ docker-compose up -d ### 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 +docker exec odoo_client1 odoo -u Dine360_Shivasakthi -d shivasakthi_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 +docker exec odoo_client1 odoo -u dine360_dashboard -d shivasakthi_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_Shivasakthi/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` +- `addons/dine360_theme_shivasakthi/static/description/icon.png` ## Troubleshooting @@ -100,7 +100,7 @@ Place PNGs here (128x128 or 256x256 recommended): - Restart Odoo: `docker-compose restart odoo` - Hard refresh browser (Ctrl + F5) -### Old modules still present (home_dashboard, restaurant_management, theme_chennora) +### Old modules still present (home_dashboard, restaurant_management, theme_shivasakthi) If you renamed modules, uninstall the old ones in Apps to avoid conflicts. ## Utilities @@ -109,5 +109,5 @@ Helper scripts for view diagnostics and homepage issues: - `resolve_homepage.py`, `fix_homepage.py`, `force_inherit.py` ## Notes -- Homepage content is fully overridden in `addons/dine360_theme_chennora/views/pages.xml`. +- Homepage content is fully overridden in `addons/dine360_theme_shivasakthi/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 deleted file mode 100644 index 0bc76d3..0000000 --- a/addons/Dine360_Chennora/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# Meta module for Dine360 Chennora -from .hooks import uninstall_hook diff --git a/addons/Dine360_Chennora/__manifest__.py b/addons/Dine360_Chennora/__manifest__.py deleted file mode 100644 index 2a535ae..0000000 --- a/addons/Dine360_Chennora/__manifest__.py +++ /dev/null @@ -1,45 +0,0 @@ -{ - 'name': 'Dine360 Restaurant Suite', - 'version': '1.0.0', - 'license': 'LGPL-3', - 'category': 'Website', - 'summary': 'Installs all Dine360 Restaurant modules', - 'author': 'Dine360', - 'depends': [ - 'dine360_restaurant', - 'dine360_order_channels', - 'dine360_dashboard', - 'dine360_theme_chennora', - 'dine360_kds', - 'dine360_reservation', - 'dine360_uber', - 'dine360_recipe', - 'dine360_self_order', - 'dine360_online_orders', - 'dine360_pos_navbar', - 'mail', - 'calendar', - 'contacts', - 'crm', - 'sale_management', - 'board', - 'point_of_sale', - 'account', - 'website', - 'purchase', - 'stock', - 'hr', - ], - 'uninstall_hook': 'uninstall_hook', - 'data': [ - 'views/apps_kanban_menu.xml', - ], - 'assets': { - 'web.assets_backend': [ - 'Dine360_Chennora/static/src/css/apps_kanban_fix.css', - ], - }, - 'installable': True, - 'application': True, -} - diff --git a/addons/Dine360_Chennora/hooks.py b/addons/Dine360_Chennora/hooks.py deleted file mode 100644 index fd48152..0000000 --- a/addons/Dine360_Chennora/hooks.py +++ /dev/null @@ -1,24 +0,0 @@ -from odoo import api, SUPERUSER_ID - -def uninstall_hook(env): - """ - Synchronized uninstallation: When Dine360 Restaurant Suite is uninstalled, - automatically trigger uninstallation for all its core sub-modules. - """ - modules_to_uninstall = [ - 'dine360_dashboard', - 'dine360_restaurant', - 'dine360_theme_chennora', - 'dine360_kds', - 'dine360_reservation' - ] - - # Search for these modules if they are installed - modules = env['ir.module.module'].search([ - ('name', 'in', modules_to_uninstall), - ('state', '=', 'installed') - ]) - - if modules: - # Mark modules for uninstallation - modules.button_uninstall() diff --git a/addons/Dine360_Chennora/static/description/icon.png b/addons/Dine360_Chennora/static/description/icon.png deleted file mode 100644 index 6fe8f76..0000000 Binary files a/addons/Dine360_Chennora/static/description/icon.png and /dev/null differ diff --git a/addons/Dine360_Chennora/static/src/css/apps_kanban_fix.css b/addons/Dine360_Chennora/static/src/css/apps_kanban_fix.css deleted file mode 100644 index 7418207..0000000 --- a/addons/Dine360_Chennora/static/src/css/apps_kanban_fix.css +++ /dev/null @@ -1,31 +0,0 @@ -/* Fix Apps kanban icon sizing and dropdown overlap */ -.o_modules_kanban .oe_module_vignette, -.o_modules_kanban .o_kanban_record { - overflow: visible; -} - -.o_modules_kanban .o_kanban_record { - position: relative; - z-index: 1; -} - -.o_modules_kanban .oe_module_icon { - width: 64px; - height: 64px; - display: flex; - align-items: center; - justify-content: center; -} - -.o_modules_kanban .oe_module_icon img { - width: 64px; - height: 64px; - object-fit: contain; -} - -.o_modules_kanban .oe_module_vignette .dropdown-menu { - right: 0; - left: auto; - min-width: 160px; - z-index: 1060; -} diff --git a/addons/Dine360_Chennora/views/apps_kanban_menu.xml b/addons/Dine360_Chennora/views/apps_kanban_menu.xml deleted file mode 100644 index 59b3bff..0000000 --- a/addons/Dine360_Chennora/views/apps_kanban_menu.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/addons/dine360_dashboard/data/branding_data.xml b/addons/dine360_dashboard/data/branding_data.xml index 46e4680..3b62c4c 100644 --- a/addons/dine360_dashboard/data/branding_data.xml +++ b/addons/dine360_dashboard/data/branding_data.xml @@ -1,9 +1,9 @@ - + web.base_title - Chennora + Shivasakthi diff --git a/addons/dine360_dashboard/static/src/css/login_style.css b/addons/dine360_dashboard/static/src/css/login_style.css index 3b9e7e8..352e243 100644 --- a/addons/dine360_dashboard/static/src/css/login_style.css +++ b/addons/dine360_dashboard/static/src/css/login_style.css @@ -4,7 +4,7 @@ height: 100vh !important; width: 100vw !important; overflow: hidden; - background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/dine360_theme_chennora/static/src/img/chen-banner-2.webp') !important; + background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/dine360_theme_shivasakthi/static/src/img/chen-banner-2.webp') !important; background-repeat: no-repeat !important; background-position: center center !important; background-size: cover !important; @@ -255,7 +255,7 @@ body.o_custom_login_body .o_login_main_wrapper { height: 100vh !important; /* width: 100vw !important; */ overflow: hidden !important; - background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/dine360_theme_chennora/static/src/img/chen-banner-2.webp') no-repeat center center !important; + background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/dine360_theme_shivasakthi/static/src/img/chen-banner-2.webp') no-repeat center center !important; background-size: cover !important; } diff --git a/addons/dine360_dashboard/static/src/css/pos_style.css b/addons/dine360_dashboard/static/src/css/pos_style.css index 8b97ab7..3e750c4 100644 --- a/addons/dine360_dashboard/static/src/css/pos_style.css +++ b/addons/dine360_dashboard/static/src/css/pos_style.css @@ -1,5 +1,5 @@ -/* ======================================== - CHENNORA RUSH MODE - POS THEME (ULTRA PREMIUM) +/* ======================================== + SHIVASAKTHI RUSH MODE - POS THEME (ULTRA PREMIUM) ======================================== */ :root { diff --git a/addons/dine360_dashboard/static/src/js/chennora_title.js b/addons/dine360_dashboard/static/src/js/chennora_title.js index 55d5e07..cb26828 100644 --- a/addons/dine360_dashboard/static/src/js/chennora_title.js +++ b/addons/dine360_dashboard/static/src/js/chennora_title.js @@ -2,17 +2,30 @@ import { WebClient } from "@web/webclient/webclient"; import { patch } from "@web/core/utils/patch"; +import { onMounted } from "@odoo/owl"; patch(WebClient.prototype, { setup() { super.setup(); - this.title.setParts({ brand: "Chennora" }); - - // Redirect to main dashboard if landing on backend root (common after module upgrade/install) - const hash = window.location.hash; - if (!hash || hash === "#home") { - window.location.href = "/"; + try { + this.title.setParts({ brand: "Shivasakthi" }); + } catch (e) { + // title service not ready yet, ignore } + + onMounted(() => { + try { + // Only redirect to home dashboard if the URL has no meaningful hash + // (i.e., user just typed /web or /web# directly) + const hash = window.location.hash; + const path = window.location.pathname; + if (path === "/web" && (!hash || hash === "#" || hash === "#home")) { + window.location.href = "/"; + } + } catch (e) { + // ignore redirect errors + } + }); } }); diff --git a/addons/dine360_dashboard/views/home_template.xml b/addons/dine360_dashboard/views/home_template.xml index 062df91..31d018b 100644 --- a/addons/dine360_dashboard/views/home_template.xml +++ b/addons/dine360_dashboard/views/home_template.xml @@ -1,4 +1,4 @@ - +