From a4a383d982d049899e41f3ddcf81efd104258f0b Mon Sep 17 00:00:00 2001 From: Alaguraj0361 Date: Fri, 30 Jan 2026 18:34:49 +0530 Subject: [PATCH] Introduce the Chennora Odoo theme module, add a view debugging script, and specify docker-compose version 3.8. --- addons/check_about_view.py | 38 +++++++++++++++++++++ addons/theme_chennora/__manifest__.py | 1 + addons/theme_chennora/data/website_data.xml | 14 ++++++++ docker-compose.yml | 3 +- 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 addons/check_about_view.py create mode 100644 addons/theme_chennora/data/website_data.xml diff --git a/addons/check_about_view.py b/addons/check_about_view.py new file mode 100644 index 0000000..adae03c --- /dev/null +++ b/addons/check_about_view.py @@ -0,0 +1,38 @@ +from odoo import env + +def check_about_views(): + # Find the main About Us view + about_view = env.ref('website.aboutus', raise_if_not_found=False) + if not about_view: + print("CRITICAL: 'website.aboutus' view not found!") + return + + print(f"Base View: {about_view.name} (ID: {about_view.id}, Key: {about_view.key})") + print(f"Arch Updated: {about_view.arch_updated}") + + # Check for specific views affecting this + views = env['ir.ui.view'].search([('key', '=', 'website.aboutus')]) + for v in views: + print(f"Found View with key='website.aboutus': {v.name} (ID: {v.id}, Model: {v.model}) - Active: {v.active}") + + # Check for inheriting views + inheriting_views = env['ir.ui.view'].search([('inherit_id', '=', about_view.id)]) + print(f"\nInheriting Views ({len(inheriting_views)}):") + for v in inheriting_views: + print(f" - {v.name} (ID: {v.id}, Key: {v.key}, Priority: {v.priority}) - Active: {v.active}") + + # Check if there is a specific page record + page = env['website.page'].search([('url', '=', '/aboutus')]) + if page: + print(f"\nPage '/aboutus' found: {page.name} (View ID: {page.view_id.id})") + if page.view_id != about_view: + print(f"WARNING: Page is using a different view: {page.view_id.name} (ID: {page.view_id.id}, Key: {page.view_id.key})") + else: + print("\nPage '/aboutus' NOT found in website.page!") + + # Check /about just in case + page_custom = env['website.page'].search([('url', '=', '/about')]) + if page_custom: + print(f"\nPage '/about' found: {page_custom.name} (View ID: {page_custom.view_id.id})") + +check_about_views() diff --git a/addons/theme_chennora/__manifest__.py b/addons/theme_chennora/__manifest__.py index b1fc191..306a7aa 100644 --- a/addons/theme_chennora/__manifest__.py +++ b/addons/theme_chennora/__manifest__.py @@ -10,6 +10,7 @@ 'views/pages.xml', # specific page content (Home, About, etc.) 'views/snippets.xml', # Custom Building Blocks 'views/options.xml', # Options for snippets (if any) + 'data/website_data.xml', # Data for creating pages ], 'assets': { 'web.assets_frontend': [ diff --git a/addons/theme_chennora/data/website_data.xml b/addons/theme_chennora/data/website_data.xml new file mode 100644 index 0000000..c18f18d --- /dev/null +++ b/addons/theme_chennora/data/website_data.xml @@ -0,0 +1,14 @@ + + + + + + /about + True + + About Us + + + + diff --git a/docker-compose.yml b/docker-compose.yml index 221dc07..a6a04c5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ - +version: "3.8" services: db: image: postgres:15 @@ -25,7 +25,6 @@ services: volumes: - client1_odoo_data:/var/lib/odoo - ./addons:/mnt/extra-addons - restart: always volumes: