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 render organizational chart in any view?

Suscribirse

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

Se marcó esta pregunta
viewschartDocker13
1 Responder
5912 Vistas
Avatar
Ian Riva B

On the hr_employee module, under the employee directory, in the form view there is a organizational chart (that can be turned on and off from the settings). 

I have a model that inherits from hr.employee and my goal is to render the same chart in my new view. In the hr.employee views there is a div in the forms where should render the chart, but it's empty.

From the hr_employee view:

------------

<page name="public" string="Work Information">

                                <div id="o_work_employee_container"> <!-- These two div are used position org_chart -->

                                    <div id="o_work_employee_main">

                                        <group string="Location">

                                            <field name="address_id"

                                                context="{'show_address': 1}"

                                                options='{"always_reload": True, "highlight_first_line": True}'/>

                                        </group>

                                        <group name="managers" string="Responsibles">

                                            <field name="coach_id"/>

                                        </group>

                                        <group string="Schedule" groups="base.group_no_one">

                                            <field name="resource_calendar_id"/>

                                        </group>

                                    </div>

                                </div>

                            </page>

------------

I tried to use the same divs but nothing is rendered, how can I use the same chart?


The form view:

------------

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

        <field name="name">Detalles empleado</field>

        <field name="model">hr.employee</field>

        <!--<field name="inherit_id" ref="hr_employee.hr_employee_public_view_form"/>-->

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

            <form string="Employee Details Form">

                <header>

                    <button name="test_method" string="Test button" type="object" attrs="" class="oe_highlight" />

                    <button name="calculate_salary" string="Calcular salario" type="object" attrs="" class="oe_highlight" />

                    <button name="calculate_all_salaries" string="Calcular todos los salarios" type="object" attrs="" class="oe_highlight" />

                </header>

                <sheet>

                    <div class="oe_title">

                        <h1>

                            <field name="name" />

                        </h1>

                    </div>

                    <group>

                        <group>

                            <field name="company_id" />

                            <field name="commercial_plan_id" />

                            <field name="parent_id" />

                        </group>

                        <group>

                            <field name="child_all_count" />

                            <field name="phone" />

                            <field name="sex" />

                        </group>

                    </group>

                    <group>

                        <field name="salary_type" />

                        <field name="base_salary" />

                        <field name="last_payment" />

                    </group>

                    <group>

                        <div id="o_employee_right">

                            <h4 class="o_org_chart_title mb16 mt0">Organization Chart</h4>

                            <field name="child_ids" widget="hr_org_chart" />

                        </div>

                    </group>

                    <notebook>

                        <page string="Pólizas">

                            <field name="policy_ids" />

                        </page>

                        <page string="Pagos">

                            <field name="payment_ids" />

                        </page>

                        <page string="Subordinados directos">

                            <field name="child_ids" />

                        </page>

                        <page string="Notas extra">

                            <field name="observation" />

                        </page>

                    </notebook>

                </sheet>

            </form>

        </field>

    </record>

------------

In the browser:

https://imgur.com/19AfU6M

0
Avatar
Descartar
Avatar
Jainesh Shah(Aktiv Software)
Mejor respuesta

Hello  Ian Riva B,

You have to add child_ids field in you form view

                <div id="o_employee_right">

                    <h4 class="o_org_chart_title mb16 mt0">Organization Chart</h4>

                    <field name="child_ids" widget="hr_org_chart"/>

                </div>

add above code at your page.

Thank You!


Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

    

1
Avatar
Descartar
Ian Riva B
Autor

Hi, thanks for your answer, but the code above it's rendering a list, do you know why? I edited the original answer with the code of my view and a screenshot.

¿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
Create split view of list of objects | object content
views 13
Avatar
0
ene 21
2830
Dynamic Form from Tree View Resuelto
action views 13
Avatar
Avatar
Avatar
3
ago 20
5096
[Odoo SH] How to hide "create invoice" button Resuelto
views accessrights odoo.sh 13
Avatar
Avatar
2
mar 21
4303
Select multiple elements with XPath Resuelto
views
Avatar
Avatar
Avatar
Avatar
Avatar
5
ago 24
48225
How to automate initial configuration? Resuelto
13
Avatar
Avatar
Avatar
Avatar
4
feb 24
7996
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