diff --git a/addons/education_dashboard/controllers/__pycache__/main.cpython-312.pyc b/addons/education_dashboard/controllers/__pycache__/main.cpython-312.pyc index 808b76d..8eea5c9 100644 Binary files a/addons/education_dashboard/controllers/__pycache__/main.cpython-312.pyc and b/addons/education_dashboard/controllers/__pycache__/main.cpython-312.pyc differ diff --git a/addons/education_dashboard/controllers/main.py b/addons/education_dashboard/controllers/main.py index 3177f77..44de914 100644 --- a/addons/education_dashboard/controllers/main.py +++ b/addons/education_dashboard/controllers/main.py @@ -109,6 +109,33 @@ class EducationDashboardController(http.Controller): except Exception: pass + # ── Announcements ───────────────────────────────────────────────────── + announcements_data = [] + try: + announcements = env['education.announcement'].search( + [('active', '=', True)], + order='date_published desc', limit=4 + ) + for ann in announcements: + import re + subtitle = re.sub('<[^>]+>', '', ann.content or '')[:60] + type_colors = { + 'notice': ('#fee2e2', '#b91c1c'), + 'circular': ('#e0f2fe', '#0369a1'), + 'event': ('#fef9c3', '#a16207') + } + bg_color, text_color = type_colors.get(ann.announcement_type, ('#d1fae5', '#065f46')) + ann_type = dict(ann._fields['announcement_type'].selection).get(ann.announcement_type) if ann.announcement_type else 'Notice' + announcements_data.append({ + 'title': ann.title, + 'subtitle': subtitle + ('...' if len(subtitle) == 60 else ''), + 'type': ann_type, + 'bg_color': bg_color, + 'text_color': text_color, + }) + except Exception: + pass + # ── User / date context ─────────────────────────────────────────────── user_name = env.user.name today_str = datetime.date.today().strftime('%A, %b %d, %Y') @@ -149,6 +176,7 @@ class EducationDashboardController(http.Controller): # operational 'upcoming_exams': upcoming_exams, 'recent_activities': recent_activities, + 'announcements': announcements_data, # context 'user_name': user_name, 'today': today_str, diff --git a/addons/education_dashboard/static/src/js/education_dashboard.js b/addons/education_dashboard/static/src/js/education_dashboard.js index 3cce0d8..f26bc7c 100644 --- a/addons/education_dashboard/static/src/js/education_dashboard.js +++ b/addons/education_dashboard/static/src/js/education_dashboard.js @@ -243,7 +243,7 @@ class EducationDashboard extends Component { openCreateCourse() { this.actionService.doAction({ name: "Courses", type: "ir.actions.act_window", - res_model: "education.course", + res_model: "education.lms.course", views: [[false, "list"], [false, "form"]], target: "current" }); } @@ -267,7 +267,7 @@ class EducationDashboard extends Component { openFees() { this.actionService.doAction({ name: "Fee Payments", type: "ir.actions.act_window", - res_model: "education.fee.payment", + res_model: "education.student.payment", views: [[false, "list"], [false, "form"]], target: "current" }); } diff --git a/addons/education_dashboard/static/src/xml/education_dashboard_templates.xml b/addons/education_dashboard/static/src/xml/education_dashboard_templates.xml index 534faa9..7d301f3 100644 --- a/addons/education_dashboard/static/src/xml/education_dashboard_templates.xml +++ b/addons/education_dashboard/static/src/xml/education_dashboard_templates.xml @@ -239,38 +239,24 @@ View All -
- Important -
-
Exam Schedule Released
-
Mid-term schedule has been published.
+ + +
+ +
+
+
+
+ +
+
+
+ +
+ +
No recent announcements
- -
-
- General -
-
Library Hours Extended
-
Open till 8 PM this week.
-
- -
-
- Academic -
-
Course Registration Open
-
Elective course registration is now open.
-
- -
-
- Event -
-
Annual Tech Fest
-
Scheduled for next month.
-
- -
+
diff --git a/addons/education_exam/views/portal_exam_templates.xml b/addons/education_exam/views/portal_exam_templates.xml index 5e8e599..324735e 100644 --- a/addons/education_exam/views/portal_exam_templates.xml +++ b/addons/education_exam/views/portal_exam_templates.xml @@ -822,9 +822,9 @@
- © 2026 My Company. All rights reserved. - Powered by odoo -
+ © 2026 Metatron EduPortal. All rights reserved. + Powered by Metatroncube + @@ -962,9 +962,9 @@
- © 2026 My Company. All rights reserved. - Powered by odoo -
+ © 2026 Metatron EduPortal. All rights reserved. + Powered by Metatroncube + @@ -1144,9 +1144,9 @@
- © 2026 My Company. All rights reserved. - Powered by odoo -
+ © 2026 Metatron EduPortal. All rights reserved. + Powered by Metatroncube + diff --git a/addons/education_portal/views/login_templates.xml b/addons/education_portal/views/login_templates.xml index cb0c898..e9df3cd 100644 --- a/addons/education_portal/views/login_templates.xml +++ b/addons/education_portal/views/login_templates.xml @@ -319,10 +319,10 @@ -
-
Powered by Odoo Education Portal
-
© 2026 My Company. All rights reserved.
-
+
+ © 2026 Metatron EduPortal. All rights reserved. + Powered by Metatroncube +
diff --git a/addons/education_portal/views/portal_templates.xml b/addons/education_portal/views/portal_templates.xml index 47bba22..61e8d87 100644 --- a/addons/education_portal/views/portal_templates.xml +++ b/addons/education_portal/views/portal_templates.xml @@ -1173,9 +1173,9 @@
- © 2026 My Company. All rights reserved. - Powered by odoo -
+ © 2026 Metatron EduPortal. All rights reserved. + Powered by Metatroncube + @@ -1971,9 +1971,9 @@
- © 2026 My Company. All rights reserved. - Powered by odoo -
+ © 2026 Metatron EduPortal. All rights reserved. + Powered by Metatroncube + @@ -2864,9 +2864,9 @@
- © 2026 My Company. All rights reserved. - Powered by odoo -
+ © 2026 Metatron EduPortal. All rights reserved. + Powered by Metatroncube + @@ -3591,9 +3591,9 @@
- © 2026 My Company. All rights reserved. - Powered by odoo -
+ © 2026 Metatron EduPortal. All rights reserved. + Powered by Metatroncube +