Merge pull request #80 from expsa/odex_theme_branch

Odex theme branch
This commit is contained in:
Tahir Hassan 2026-01-07 02:24:31 +04:00 committed by GitHub
commit 0e1f312506
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 13 deletions

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models from . import models

View File

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import ir_http from . import ir_http
from . import res_users_settings from . import res_users_settings

View File

@ -5,10 +5,17 @@
<xpath expr="//h3" position="replace"> <xpath expr="//h3" position="replace">
<h3 class="px-0"> <h3 class="px-0">
Odex 30 Odex 30 Platform
</h3> </h3>
</xpath> </xpath>
<xpath expr="//div[@id='settings']" position="replace">
<div role="tabpanel" id="settings" class="tab-pane active text-muted o_web_settings_compact_subtitle">
<small>Copyright © 2017 <a target="_blank" href="https://www.exp-sa.com" style="text-decoration: underline;">Expert Ltd. SA</a></small>
</div>
</xpath>
</t> </t>
</templates> </templates>

View File

@ -40,11 +40,9 @@ class ResConfigSettings(models.TransientModel):
"""Generate CSS rules for sidebar menu state""" """Generate CSS rules for sidebar menu state"""
if self.disable_nav_menu_section: if self.disable_nav_menu_section:
return """ return """
/* Sidebar Menu Disabled - Hide Top Menu Sections */
.o_main_navbar .o_menu_sections { .o_main_navbar .o_menu_sections {
{ display: none!important;
display: none !important; visibility: hidden!important;
visibility: hidden !important;
} }
""" """
return "" return ""

View File

@ -1,14 +1,11 @@
/** @odoo-module **/ /** @odoo-module **/
import { useService } from "@web/core/utils/hooks";
import { registry } from "@web/core/registry"; import { registry } from "@web/core/registry";
import { rpc } from "@web/core/network/rpc"
/** /**
* Load and inject sidebar CSS rules based on configuration * Load and inject sidebar CSS rules based on configuration
*/ */
export function loadSidebarCSS() { export function loadSidebarCSS() {
// Get the RPC service
const rpc = useService("rpc");
const loadCSS = async () => { const loadCSS = async () => {
try { try {
@ -22,11 +19,13 @@ export function loadSidebarCSS() {
kwargs: {}, kwargs: {},
} }
); );
console.log('Fetched sidebar CSS:', css);
if (css && css.trim()) { if (css && css.trim()) {
// Create a style element and inject the CSS // Create a style element and inject the CSS
const style = document.createElement('style'); const style = document.createElement('style');
style.type = 'text/css'; // style.type = 'text/css';
style.id = 'sidebar-dynamic-css'; style.id = 'sidebar-dynamic-css';
style.innerHTML = css; style.innerHTML = css;
document.head.appendChild(style); document.head.appendChild(style);
@ -51,4 +50,4 @@ registry.category("web_tour.tours").add("sidebar_css_loader", {
}); });
// Auto-load CSS on page load // Auto-load CSS on page load
// loadSidebarCSS(); loadSidebarCSS();