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
    Food & Hospitality
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Guest House
    • Distribuidor de bebidas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consulting
    • Accounting Firm
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Trades
    • Handyman
    • Hardware y asistencia informática
    • Solar Energy Systems
    • Zapatero
    • Servicios de limpieza
    • HVAC Services
    Others
    • Nonprofit Organization
    • 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

Open tree view by default in tree without view_mode form

Suscribirse

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

Se marcó esta pregunta
treetree_view
2 Respuestas
12431 Vistas
Avatar
Michael Jurke

I specified a tree view and action view to open the tree view for a model. It works as first with the following XML:

```

<record id="my_feature_tree" model="ir.ui.view">
  ...
</record>

<record id="action_my_feature_tree1" model="ir.actions.act_window">
  <field name="name">My Feature</field>
  <field name="res_model">my_module.my_model</field>
  <field name="view_type">form</field>
  <field name="view_mode">tree,kanban,form,pivot,graph</field>
  <field eval="False" name="view_id"/>
  <field name="domain">
    [('agent_id','!=',False)]
  </field>
  <!-- <field name="search_view_id" ref="view_account_invoice_filter"/> -->
</record>

<record id="action_my_feature_tree1_view1" model="ir.actions.act_window.view">
  <field eval="1" name="sequence"/>
  <field name="view_mode">tree</field>
  <field name="view_id" ref="my_feature_tree"/>
  <field name="act_window_id" ref="action_my_feature_tree1"/>
</record>

```

But when I remove the view_mode "form" and set view_type to "tree", the view is broken:

* tree view is missing entirely (only kanban, pivot and graph are available

Is this a bug? This tree view is just a database view and record creations is undesirable. I already added create="false" to the tree element to get rid of the "Create" and "Import" buttons, but still it opens the form when clicking on a line.

It would also solve my problem if I could specify another form view AND model to represent in the form view. But the tree model and the default form view cannot be used.

Thanks a lot!

1
Avatar
Descartar
Avatar
Michael Jurke
Mejor respuesta

I found a workaround by specifying separate views for tree and form.

However, it does not really answer the question, because I did not find a way to disable the form view. It is still a bit confusing for the customer, it would be preferable not to open the form view at all because there are other clickable buttons in the rows. 

But I leave the workaround here for whoever needs it. You can create a custom action and assign custom action views to it like this:

  <record id="action_my_products" model="ir.actions.act_window">
    <field name="name">Products</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">product.product</field>
    <field name="view_mode">tree,form</field>
    <field name="view_id" ref="<tree_view_ref>"/>
  </record>

  <record id="action_my_products_tree" model="ir.actions.act_window.view">
    <field name="view_mode">tree</field>
    <field name="view_id" ref="<tree_view_ref>"/>
    <field name="act_window_id" ref="action_my_products"/>
  </record>

  <record id="action_my_product_form" model="ir.actions.act_window.view">
    <field name="view_mode">form</field>
    <field name="view_id" ref="<form_view_ref>"/>
    <field name="act_window_id" ref="action_my_products"/>
  </record>


0
Avatar
Descartar
Avatar
yasir iqbal
Mejor respuesta

same problem

0
Avatar
Descartar
Michael Jurke

In another, more recent project I used the above workaround with an informational dummy form view. Maybe it helps you, too.

¿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
Error while printing a tree: Can't render view base.view_partner_form for model: res.partner
treeview tree tree_view
Avatar
1
abr 16
4622
Reduced Tree view screen space or multiple trees in single screen
tree tree_but_open tree_view
Avatar
Avatar
1
mar 15
4990
tree colors in a view contains a statusbar ?? Resuelto
tree colors tree_view
Avatar
Avatar
1
mar 15
6987
Show a field from many2many relationship in a tree view Resuelto
treeview tree many2many tree_view
Avatar
Avatar
Avatar
Avatar
4
jun 25
12294
Making a tree column invisible depending on the view or model
tree_view
Avatar
Avatar
2
may 22
4372
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