Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

detailed web template inheritance for website themes

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
webinheritancetemplatesthemewebsite_builder
1 Responder
10148 Vistas
Avatar
Barry Smoke

I tip my hat off to the odoo documenation team.  There is quite a bit of documentation available, however there are some gaps that need filled in, especially for a newbie like me coming from a php background.  The biztech theme available for free helped me the most in figuring out how to modify, and use a basic bootstrap theme.

I have successfully created a theme, and installed it, and I have my homepage rendering to a custom bootstrap theme.  I think I've realized some limitations in the odoo xml theme framework.  I tried to do something simple, in my opinion, which is move the default navigation menu to a location under a parrallax header in the theme.  In php, and traditional cms, this wouldn't be a problem, since there are tags that allow you to place rendered content anywhere inside your theme.  odoo however uses template blocks, and there is not a master template file, that is used on every render(with variables inside for rendering content).

The closest thing is to override the default page layout, using a page definition, but there is not enough documentation of how the default page templates work.  You have to read the code, and there are obviously things I'm missing in the flow. 

I've tried doing a new homepage template using the page=True, and I had much greater control over how that page looked.  The problem with this approach, is the page editing was completely missing.  I could not figure out what t-call to do to include that.

xpath calls are only helpful on the website.layout, and don't help you on an inherited view.

For example, if I were to attempt to replace the existing header in the default layout with empty content, so I could move it later in the template flow, I would think the logical way would be an xpath search with replace.  this works for website.layout, but not if I just want the change on a single page.

<xpath expr="//div[@id='wrapwrap']/header" path is not found, if I use that inside a template, where inherit_id="website.homepage", but it works fine in website.layout.

So my next thought is to actually do this on website.layout, however use template variables to detect homepage.  how would I use a t-call="website.layout", but replace the resulting content based on a t-if homepage?



0
Avatar
Descartar
Avatar
S. Edelman
Mejor respuesta

Hello!
I've been struggling with the same matter. I want lighter or even non-existing <header> (navigation mainly) on the front page. I've tried both using xpath like you but indeed do not know how to choose it then only for ONE website page instead of all, and also with using t-extend but no luck so far...

(here the "frontpage" is the view name you can see if you look with "customize theme".

<?xml version="1.0" encoding="utf-8"?>

<templates>

<t t-extend="website.layout">

<t t-if="website.frontpage">

<t t-jquery="header" t-operation="replace">

<header>

<div class="navbar navbar-default navbar-static-top">

<div class="container">

<div class="collapse navbar-collapse navbar-top-collapse">

<ul class="nav navbar-nav navbar-right" id="top_menu">

<li class="dropdown" t-ignore="true" t-if="website.user_id != user_id" style="display:none;">

<a href="#" class="dropdown-toggle" data-toggle="dropdown">

<b>

<span t-esc="(len(user_id.name)&gt;25) and (user_id.name[:23]+'...') or user_id.name"/>

<span class="caret"></span>

</b>

</a>

<ul class="dropdown-menu js_usermenu" role="menu">

<li id="o_logout"><a t-attf-href="/web/session/logout?redirect=/" role="menuitem">Logout</a></li>

</ul>

</li>

</ul>

</div>

</div>

</div>

</header>

</t>

</t>

</t>

</templates>


0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
how to change tooltip question mark symbol? Resuelto
web inheritance qweb templates frontend
Avatar
1
dic 23
2521
How changing the appearance of the Odoo site header template
web templates
Avatar
Avatar
1
dic 22
6023
How to create option for snippets in website template odoo 15 or 16
web templates
Avatar
Avatar
1
nov 22
6095
I did not see my newly created theme as tutorial said
theme website_builder
Avatar
0
sept 21
3999
template inherit by id inherits wrong template
inheritance templates
Avatar
0
abr 21
2442
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Sitio web hecho con

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now