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

Odoo 17 – InnerGroup Error “Cannot read properties of undefined (reading 'name')” when using custom widget

Suscribirse

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

Se marcó esta pregunta
customwidget
2 Respuestas
410 Vistas
Avatar
Gowtham S

Hi everyone,

I’m on Odoo 17 and I created a very simple custom widget that extends CharField and renders a plain <input>.

The widget works in isolation, but when I use it like this:

<field name="father_name" widget="reusable_input"/>

the form crashes with:

OwlError: Cannot read properties of undefined (reading 'name') at InnerGroup.template

If I remove the widget attribute (or remove the field entirely), the form loads normally.

Here is the widget:

import { registry } from "@web/core/registry"; import { CharField } from "@web/views/fields/char/char_field"; export class ReusableInput extends CharField { onInput(ev) { this.props.update(ev.target.value); } } ReusableInput.template = "school_fee_management.reusable_input"; registry.category("fields").add("reusable_input", ReusableInput);

And the template:

<t t-name="school_fee_management.reusable_input"> <input type="text" t-att-value="props.value" t-on-input="onInput"/> </t>

XML:

<group string="Parent Contact"> <field name="father_name" widget="reusable_input"/> <field name="phone"/> </group>

Has anyone seen this InnerGroup error when using custom widgets in Odoo 17?

What extra metadata or props does the widget need so InnerGroup doesn’t break?

Thanks in advance.

0
Avatar
Descartar
Codesphere Tech
Hello,
Please try to inherit the template like this:
<t t-name="current name of your template" t-inherit="web.CharField" t-inherit-mode="extension">
    <xpath expr="//input" position="replace">
        <input type="text"
               t-att-value="props.value"
               t-on-input="onInput"/>
    </xpath>
</t>

Hope it helps.

Avatar
Kunjan Patel
Mejor respuesta
Hello Gowtham S,
I hope you are doing well

Cause: Custom template doesn't inherit the base CharField template structure properly.
Solution: Inherit the CharField template using XPath instead of replacing it:
<t t-name="school_fee_management.reusable_input" t-inherit="web.CharField" t-inherit-mode="extension">
      <xpath expr="//input" position="replace">
          <input type="text" t-att-value="props.value" t-on-input="onInput"/>
      </xpath>
</t>

This preserves the required props/metadata from the parent widget template.

I hope this information helps you

Thanks & Regards,
Kunjan Patel
0
Avatar
Descartar
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Mejor respuesta

Hi,

The issue is that your custom widget template is too minimal and doesn't provide the structure that Odoo's form view expects when rendering fields inside groups. The InnerGroup component is trying to read properties (like name) that aren't available because your template bypasses the standard field wrapper.

Instead of replacing the entire template, extend CharField and just override the input rendering:

import { registry } from "@web/core/registry";

import { CharField } from "@web/views/fields/char/char_field";

export class ReusableInput extends CharField {

    onInput(ev) {

        this.props.update(ev.target.value);

    }

}

// Use CharField's template, or extend it

ReusableInput.template = "web.CharField";

registry.category("fields").add("reusable_input", ReusableInput);


Hope it helps.

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
Creating new widget in openerp 7.0
customwidget
Avatar
Avatar
Avatar
Avatar
3
sept 15
11101
Odoo 11: Passing parameters to custom widget? Resuelto
javascript customwidget
Avatar
Avatar
1
mar 18
7466
[12.0] How to get changes from the parent view to a custom widget
customwidget 12.0 JS
Avatar
0
abr 20
4021
Custom Widget : Field invisible if empty Resuelto
customwidget invisibility odoo9
Avatar
3
dic 16
8768
Error in Qweb in custom module widget Resuelto
js customwidget qweb2
Avatar
1
jul 16
4415
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