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

How to debug owl in Odoo 16 CE

Suscribirse

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

Se marcó esta pregunta
debuggingOWLodoo16features
1 Responder
5146 Vistas
Avatar
ChrisB_USA

My question is: What is the correct way to debug forms and wizards in custom module development when using owl?

I was updating a custom module from Odoo 14 to Odoo 16.  My module has a wizard.  

The wizard failed to display and instead showed a series of generic owl error stack traces.  The error indicated `Type Error domain.map is not a function`.

It was not obvious at all how to see what was causing this error.

In Odoo 14, if I had something wrong in the xml for the view, I would get a more meaningful stack trace that would indicate the thing that was illegal syntax or whatnot.  I still get that if I have an actual syntax error.  But in this case, it is probably "legal" syntax, but caused the rendering of the form to fail in owl.

I found the problem through trial and error, by commenting out almost the entirety of the xml for the wizard view, until the wizard displayed without errors.  Then I gradually put back in one element or field at a time on the wizard until I got the error.

The problem, for the record, was use of `attrs="{'readonly': 1}"` which worked correctly in Odoo 14.  

In Odoo 16 this caused the owl error and prevented the wizard from displaying at all.  Once I changed it to just `readonly="1"` then it displayed correctly without error.

Any pointers as to the correct way to debug such errors would be appreciated!

Thank you!

2
Avatar
Descartar
ChrisB_USA
Autor

For what it is worth, several months later, I ran into this same problem on debugging an owl error (`domain.map is not a function`) again on a different module today. After attempting to step through the js code in chrome debug tools and not getting anywhere, I searched google and ran across my own post.

And the same fault I had encountered before was the same problem this time and once I fixed it, the error went away:

`attrs="{readonly': 1}"` fails and must be written as:

`readonly="1"` in the field definition in the xml view definition.

It is unfortunate that it is seemingly so difficult to track and debug these errors. Hopefully somebody does have an answer to that! And hopefully this is helpful to others that may have run into it.

Avatar
Romain Frucco
Mejor respuesta

Hello,

Same thing if you have an attrs="{'invisible': True}" you have to remplace it by invisible="1"

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
Call JS code from button in header in Odoo 16
OWL odoo16features
Avatar
Avatar
Avatar
2
jul 24
5934
My xml dosen't update when updating the module (Owl)
OWL odoo16features
Avatar
0
ene 24
2740
in odoo16 owl, how to store current page state after go to another page, and restore them when back to this page from the breadcrumbs?
OWL odoo16features
Avatar
Avatar
1
oct 23
3120
Dialog Box Closed when I clicked to "Filters" or "Groub by" or "Favorites" Odoo 16 OWL
OWL odoo16features
Avatar
0
sept 23
2153
Show Loading Spinner on OWL Component v16
qweb OWL odoo16features
Avatar
Avatar
1
ene 25
4788
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.

Website made with

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