Introduce the Chennora Odoo theme module, add a view debugging script, and specify docker-compose version 3.8.
This commit is contained in:
parent
6e6a4a4fda
commit
a4a383d982
38
addons/check_about_view.py
Normal file
38
addons/check_about_view.py
Normal file
@ -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()
|
||||||
@ -10,6 +10,7 @@
|
|||||||
'views/pages.xml', # specific page content (Home, About, etc.)
|
'views/pages.xml', # specific page content (Home, About, etc.)
|
||||||
'views/snippets.xml', # Custom Building Blocks
|
'views/snippets.xml', # Custom Building Blocks
|
||||||
'views/options.xml', # Options for snippets (if any)
|
'views/options.xml', # Options for snippets (if any)
|
||||||
|
'data/website_data.xml', # Data for creating pages
|
||||||
],
|
],
|
||||||
'assets': {
|
'assets': {
|
||||||
'web.assets_frontend': [
|
'web.assets_frontend': [
|
||||||
|
|||||||
14
addons/theme_chennora/data/website_data.xml
Normal file
14
addons/theme_chennora/data/website_data.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="1">
|
||||||
|
<!-- Create the /about page explicitly and link it to the standard About Us view
|
||||||
|
which our theme modifies in views/pages.xml -->
|
||||||
|
<record id="about_page_chennora" model="website.page">
|
||||||
|
<field name="url">/about</field>
|
||||||
|
<field name="is_published">True</field>
|
||||||
|
<field name="view_id" ref="website.aboutus"/>
|
||||||
|
<field name="name">About Us</field>
|
||||||
|
<field name="website_indexed" eval="True"/>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
|
version: "3.8"
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
@ -25,7 +25,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- client1_odoo_data:/var/lib/odoo
|
- client1_odoo_data:/var/lib/odoo
|
||||||
- ./addons:/mnt/extra-addons
|
- ./addons:/mnt/extra-addons
|
||||||
|
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user