From efa3371c865cee14acc57d4e79d89a5fbbd0ea9e Mon Sep 17 00:00:00 2001 From: Alaguraj0361 Date: Fri, 26 Dec 2025 11:03:30 +0530 Subject: [PATCH] first commit --- addons/home_dashboard/__init__.py | 2 + addons/home_dashboard/__manifest__.py | 18 +++ .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 173 bytes addons/home_dashboard/controllers/__init__.py | 2 + .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 178 bytes .../__pycache__/main.cpython-310.pyc | Bin 0 -> 1352 bytes addons/home_dashboard/controllers/main.py | 24 ++++ .../static/src/css/home_menu.css | 129 ++++++++++++++++++ addons/home_dashboard/views/home_template.xml | 47 +++++++ docker-compose.yml | 34 +++++ 10 files changed, 256 insertions(+) create mode 100644 addons/home_dashboard/__init__.py create mode 100644 addons/home_dashboard/__manifest__.py create mode 100644 addons/home_dashboard/__pycache__/__init__.cpython-310.pyc create mode 100644 addons/home_dashboard/controllers/__init__.py create mode 100644 addons/home_dashboard/controllers/__pycache__/__init__.cpython-310.pyc create mode 100644 addons/home_dashboard/controllers/__pycache__/main.cpython-310.pyc create mode 100644 addons/home_dashboard/controllers/main.py create mode 100644 addons/home_dashboard/static/src/css/home_menu.css create mode 100644 addons/home_dashboard/views/home_template.xml create mode 100644 docker-compose.yml 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 0000000000000000000000000000000000000000..f44f090e973ce89cb37d8e23a64f31e43f1cbdc8 GIT binary patch literal 173 zcmd1j<>g`kg7PcgnU+BMF^Gc(44TX@8G*u@ zjJLRx^YcoI@^f-hi;Dd;nQk!@fi$jUC}IIpVB(jKer{fgeriQYQKD{QN=klSv3^E= tZfbl=VsS=NeqvFIetdjpUS>&ryk0@&Ee@O9{FKt1R6CFb#UR537y%{fC%*sy literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..f1bca3a41eeeaaae24706fa5dadf7972ff96d561 GIT binary patch literal 178 zcmd1j<>g`kg6u2anRY<>F^Gc(44TX@8G*u@ zjJH^F6EpMtG?{KO6oGWCWGG?*Qefhjg??^ciGFHDNl~J1VoFMWUa@{ger{@fN@8(F yQhs7lihgo_UP)1YPEKl3v3`7fW?p7Ve7s&kJ9tXtJpWKX1g+U3=-GgKioZRd0!-A_NDEOb>#X|7|UL0u#33sQ7JB$l8g>?#~U zzxGMu+@*uJQT-or29gqK273C@Z*{)V#1}Kc?*@oLXSI1`VqEx$6jU67@c_kshsv=P zDEOS6@-wy)iZ6f|`kKGsj-4V?w>Yn06{_eje#Vgu@!@7%nyf3cS~p!P{0K{}8z)P3 z0YClX6HD#U6dL;@Y>m=pbL-<$WhDWY{i4(Ly2_nSxeqCx^)VsGU}m#dkQ!IUi`7o}zh4@op_HpvjlVf6$xr5G56{r9{Eb;g=B7^-5)t=zM-*FzjjRFo4 zByTrYF7Ghw&mLm-8x-j#sV_-U|Cz5yQCsh%=u6%g`WxJsqFfew4-BmxVzUITYTKbU zBQi63O@=@Gy7vcG6Ctx5Dra;{hT3@Ov+=!4n)jhUg~KO54($Dzo&!tI=7ddP0$2G# F@*eQ!OiKU& literal 0 HcmV?d00001 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