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

Why doesn't this view work?

Suscribirse

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

Se marcó esta pregunta
viewstree
3 Respuestas
3261 Vistas
Avatar
Michael Scorpio

Hi, I'm trying to get a really basic view up and running on Odoo V8. My model looks like this;


class routing_country(models.Model):

    _name = 'routing.country'

    name= fields.Char(string='Country Name', required=True)

    alpha_2= fields.Char(string='Alpha 2', required=True)

    alpha_3= fields.Char(string='Alpha 3', required=True)

    numeric= fields.Char(string='Numeric')


My view looks like this;


<record id="routing_country_action" model="ir.actions.act_window">

    <field name="name">Countries</field>

    <field name="res_model">routing.country</field>

    <field name="view_type">form</field>

    <field name="view_mode">tree,form</field>

    <field name="help" type="html">

        <p class="oe_view_nocontent_create">Click Create to add a new country.</p>

        </field>

</record>

<record id="routing_country_tree_view" model="ir.ui.view">

    <field name="name">routing.country.tree.view</field>

    <field name="model">routing.country</field>

    <field name="arch" type="XML">

        <tree string="Country">

            <field name="name"/>

            <field name="alpha_2"/>

            <field name="alpha_3"/>

            <field name="numeric"/>

        </tree>

    </field>

</record>


If I remove the second <record> everything works as expected and I see the country name only in tree view. When I add the second record to give me a tree view with the extra attributes, I get this on install;

File "lxml.etree.pyx", line 3313, in lxml.etree._Validator.assert_ (src/lxml/lxml.etree.c:159862)

AssertionError: Element field has extra content: tree, line 19

I've followed the syntax at https://www.odoo.com/documentation/8.0/howtos/backend.html and tried all sorts of variations, but no joy.

0
Avatar
Descartar
Michael Scorpio
Autor

Ok. figured it out...FINALLY..! The has be to . Lower case..!

Michael Scorpio
Autor

Tried to paste some XML in, but it didn't work. The type attribute for "arch" must be "xml", not "XML".

Avatar
Axel Mendoza
Mejor respuesta

I don't see anything inusual except that this line:

<field name="arch" type="XML">

should be:

<field name="arch" type="xml">

With a lowercase xml value

2
Avatar
Descartar
Michael Scorpio
Autor

Just discovered that that was the problem. Thanks..!

Ermin Trevisan

You should upvote and accept it as an answer then!

¿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
Select multiple elements with XPath Resuelto
views
Avatar
Avatar
Avatar
Avatar
Avatar
5
ago 24
48534
Filter out (hide) lines in tree component Resuelto
views
Avatar
Avatar
Avatar
2
abr 24
3603
What are the different types of views available in Odoo? Resuelto
views
Avatar
Avatar
Avatar
Avatar
3
jun 23
8249
view layout (two fields on the same row within an xpath) Resuelto
views
Avatar
Avatar
2
jun 23
6041
Create view without model, only with buttons and text
views
Avatar
Avatar
Avatar
3
mar 23
11297
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