Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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-13 create treeview inside treeview

Suscribirse

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

Se marcó esta pregunta
treeviewxmlodoo-13
1 Responder
5210 Vistas
Avatar
Mohammed Salah

in odoo 10 its possible to create treeview inside treeview using view_type: 


 tree


for examble: 


                    Chart of Accounts            account.account                        tree                        [('parent_id','=',False)]            {'view_all': True}        

​



 and its will make parent child accounts view, something like this:


00000000

​1111111111

​ ​222222222

​ ​ ​33333333333


but this feature is dropped in odoo-13, is there are an alternative way to make similar view?

0
Avatar
Descartar
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Mejor respuesta

Hi,

In Odoo 10, you can create a tree view inside another tree view by defining related fields and using the groups feature in the XML view definition. This allows you to display related records as a nested tree view within the parent tree view.

Here's a step-by-step guide on how to achieve this:

  1. Define Related Fields: First, you need to define related fields in your model. These related fields will establish the relationship between the parent and child records.For example, let's assume you have two models: parent.model and child.model. You want to display a list of related child.model records within the parent.model tree view. You would define a related field in the parent.model like this:

    from odoo import models, fields

    class ParentModel(models.Model):
        _name = 'parent.model'
        _description = 'Parent Model'

        name = fields.Char(string='Name')
        child_ids = fields.One2many('child.model', 'parent_id', string='Children')

    Define the Parent Tree View: In your XML view definition for the parent.model, define a tree view for it. Include the related field child_ids to display the related records.

<record id="view_parent_model_tree" model="ir.ui.view">
<field name="name">parent.model.tree</field>
<field name="model">parent.model</field>
    <field name="arch" type="xml">
        <tree>
<field name="name"/>
            <field name="child_ids" widget="one2many_list">
                <form string="Child Records">
                    <field name="field1"/>
                    <field name="field2"/>
<!-- Add more fields as needed -->
                </form>
            </field>
        </tree>
    </field>
</record>

  1. The widget="one2many_list" attribute tells Odoo to display the related records as a nested list view within the parent tree view.
  2. Define the Child Tree View (Optional): If you want to customize the tree view for the child.model, you can define a separate tree view for it in a similar way.
  3. Apply Security Groups (Optional): If you want to restrict access to certain records, you can use Odoo's security groups to control who can see the child records within the parent tree view.

Once you've defined the related fields and created the appropriate views, you should be able to see the child records displayed as a nested tree view within the parent tree view.

Keep in mind that this approach allows you to display related records in a nested fashion within the parent tree view. If you need more complex tree view structures, you might need to explore custom Odoo module development or consult with an Odoo developer for additional customization.


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.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
How can I create treeview inside a treeview
treeview xml
Avatar
0
jun 15
4462
Show history sale by partner by product
treeview xml
Avatar
0
mar 15
4341
select check box for tree view inside a form
treeview xml tree_view
Avatar
0
ago 15
8925
How to create a new tree view for inherited(res.users) model without modifying the original view? v16
treeview xml inheritance odoo16features
Avatar
Avatar
1
oct 23
3695
tree view issue editable="bottom"
treeview xml one2many attachments
Avatar
Avatar
Avatar
3
mar 24
27667
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 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