commit efa3371c865cee14acc57d4e79d89a5fbbd0ea9e Author: Alaguraj0361 Date: Fri Dec 26 11:03:30 2025 +0530 first commit diff --git a/addons/home_dashboard/__init__.py b/addons/home_dashboard/__init__.py new file mode 100644 index 0000000..e959d88 --- /dev/null +++ b/addons/home_dashboard/__init__.py @@ -0,0 +1,2 @@ +# home_dashboard/__init__.py +from . import controllers diff --git a/addons/home_dashboard/__manifest__.py b/addons/home_dashboard/__manifest__.py new file mode 100644 index 0000000..744775c --- /dev/null +++ b/addons/home_dashboard/__manifest__.py @@ -0,0 +1,18 @@ +{ + 'name': 'home_dashboard', + 'version': '1.0.1', + 'license': 'LGPL-3', + 'category': 'Website', + 'summary': 'Redirect login to home and show icon grid', + 'depends': ['base', 'web'], + 'data': [ + 'views/home_template.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'home_dashboard/static/src/css/home_menu.css', + ], + }, + 'installable': True, + 'application': True, +} \ No newline at end of file diff --git a/addons/home_dashboard/__pycache__/__init__.cpython-310.pyc b/addons/home_dashboard/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..f44f090 Binary files /dev/null and b/addons/home_dashboard/__pycache__/__init__.cpython-310.pyc differ diff --git a/addons/home_dashboard/controllers/__init__.py b/addons/home_dashboard/controllers/__init__.py new file mode 100644 index 0000000..b9e6f2b --- /dev/null +++ b/addons/home_dashboard/controllers/__init__.py @@ -0,0 +1,2 @@ +# home_dashboard/controllers/__init__.py +from . import main diff --git a/addons/home_dashboard/controllers/__pycache__/__init__.cpython-310.pyc b/addons/home_dashboard/controllers/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..f1bca3a Binary files /dev/null and b/addons/home_dashboard/controllers/__pycache__/__init__.cpython-310.pyc differ diff --git a/addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc b/addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc new file mode 100644 index 0000000..54c32de Binary files /dev/null and b/addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc differ diff --git a/addons/home_dashboard/controllers/main.py b/addons/home_dashboard/controllers/main.py new file mode 100644 index 0000000..5a6d437 --- /dev/null +++ b/addons/home_dashboard/controllers/main.py @@ -0,0 +1,24 @@ +from odoo import http +from odoo.http import request +from odoo.addons.web.controllers.home import Home + +class CustomHome(Home): + @http.route('/web/login', type='http', auth="public", website=True) + def web_login(self, *args, **kw): + response = super(CustomHome, self).web_login(*args, **kw) + if request.params.get('login_success') and request.session.uid: + return request.redirect('/') + return response + +class ImageHome(http.Controller): + @http.route('/', type='http', auth='user', website=True) + def index(self, **kwargs): + # Fetch root menus + menus = request.env['ir.ui.menu'].sudo().search([ + ('parent_id', '=', False) + ], order='sequence') + + return request.render('home_dashboard.image_home_template', { + 'menus': menus, + 'user_id': request.env.user + }) \ No newline at end of file diff --git a/addons/home_dashboard/static/src/css/home_menu.css b/addons/home_dashboard/static/src/css/home_menu.css new file mode 100644 index 0000000..ea73ecc --- /dev/null +++ b/addons/home_dashboard/static/src/css/home_menu.css @@ -0,0 +1,129 @@ +/* Main background with premium gradient */ +.o_home_menu_background { + background: linear-gradient(135deg, #f0f1f9 0%, #f6f7ff 50%, #ffffff 100%) !important; + min-height: 100vh !important; + padding: 0 !important; + margin: 0 !important; + font-family: 'Inter', 'Segoe UI', Roboto, sans-serif !important; + position: relative !important; +} + +/* App grid layout */ +.o_apps { + display: flex !important; + flex-wrap: wrap !important; + justify-content: center !important; + gap: 30px 45px !important; + max-width: 1000px !important; + margin: 0 auto !important; + padding: 20px !important; +} + +/* App card styling */ +.o_app { + display: flex !important; + flex-direction: column !important; + align-items: center !important; + text-decoration: none !important; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; + width: 110px !important; +} + +.o_app_icon_container { + background: white !important; + width: 84px !important; + height: 84px !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; + border-radius: 18px !important; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important; + margin-bottom: 8px !important; + transition: all 0.25s ease !important; +} + +.o_app:hover .o_app_icon_container { + transform: translateY(-5px) !important; + box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important; +} + +.o_app_icon { + width: 52px !important; + height: 52px !important; + object-fit: contain !important; +} + +/* App name styling */ +.o_app_name { + color: #4b4b4b !important; + font-size: 13px !important; + font-weight: 500 !important; + text-align: center !important; + letter-spacing: 0.1px !important; +} + +.o_app:hover .o_app_name { + color: #000 !important; + text-decoration: underline !important; +} + +/* Top bar styling */ +.o_home_top_bar { + position: absolute !important; + top: 15px !important; + right: 30px !important; + display: flex !important; + align-items: center !important; + gap: 15px !important; + color: #444 !important; + z-index: 100 !important; +} + +.o_top_icon { + font-size: 18px !important; + cursor: pointer !important; + opacity: 0.6 !important; + transition: all 0.2s !important; + position: relative !important; +} + +.o_top_icon:hover { + opacity: 1 !important; + transform: scale(1.1) !important; +} + +/* AI Icon special styling */ +.o_ai_icon { + background: linear-gradient(to bottom right, #ff5e62, #ff9966, #ffcc33) !important; + -webkit-background-clip: text !important; + background-clip: text !important; + -webkit-text-fill-color: transparent !important; + font-weight: bold !important; +} + +/* Badge for notifications */ +.badge_dot { + position: absolute !important; + top: -2px !important; + right: -2px !important; + width: 8px !important; + height: 8px !important; + background: #ff5e62 !important; + border-radius: 50% !important; + border: 1px solid white !important; +} + +.o_user_avatar { + width: 30px !important; + height: 30px !important; + border-radius: 50% !important; + background: #714b67 !important; + /* Odoo purple */ + color: white !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; + font-weight: 600 !important; + font-size: 11px !important; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important; +} \ No newline at end of file diff --git a/addons/home_dashboard/views/home_template.xml b/addons/home_dashboard/views/home_template.xml new file mode 100644 index 0000000..b54cafc --- /dev/null +++ b/addons/home_dashboard/views/home_template.xml @@ -0,0 +1,47 @@ + + + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..98006ca --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,34 @@ +version: "3.8" + +services: + db: + image: postgres:15 + container_name: odoo_client1_db + environment: + POSTGRES_DB: postgres + POSTGRES_USER: odoo + POSTGRES_PASSWORD: odoo + volumes: + - client1_pgdata:/var/lib/postgresql/data + restart: always + + odoo: + image: odoo:17.0 + container_name: odoo_client1 + depends_on: + - db + ports: + - "10001:8069" + environment: + HOST: db + USER: odoo + PASSWORD: odoo + volumes: + - client1_odoo_data:/var/lib/odoo + - ./addons:/mnt/extra-addons + + restart: always + +volumes: + client1_pgdata: + client1_odoo_data: \ No newline at end of file