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

How to inherit from view to add an element in it ?

Suscribirse

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

Se marcó esta pregunta
viewinherit
1 Responder
9419 Vistas
Avatar
Oussama

Hello, I'm getting difficulties to add an element to existing view by inheriting it and adding the new element as specified in the documentation. In fact the original view is not changed, and the inherited view has no effect..

Here is what I get whether before or after adding the inherit view (which should add a page for Radiology ) : http://img11.hostingpics.net/pics/596530Screenshotfrom20140721132617.png

Here is the code of the original view : ( I pasted only the part specific to the <form> )

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
         <record id="view_oemedical_patient_form" model="ir.ui.view">
             <field name="name">oemedical.patient.form</field>
             <field name="model">oemedical.patient</field>
             <field name="priority" eval="8" />
             <field name="arch" type="xml">
              <form string="Patient" version="7.0">
                    <sheet>
                        <div>
                            <field name="photo" widget='image' class="oe_left oe_avatar"/>
                            <div>
                                 <h1>
                                    <field name="first_name" placeholder="First Name" style="width: 20%%" on_change="onchange_name(first_name, lastname, slastname, context)"  />
                                    <!-- some other fields -->
                                </h1>
                            </div>
                 <!-- some other code -->
                        </div>
                    <notebook>
                        <page string="General Information">
                            <group  col="6" colspan="4">
                                 <field name="blood_type" style="width: 8%%"/>
                                 <field name="rh" nolabel="1"/>
                                   <field name="ethnic_group" />
                            </group>
                            <group string="Contact Information">
                                <group>
                                    <label for="street" string="Address"/>
                                    <div>
                                        <field name="use_parent_address" class="oe_edit_only oe_inline" invisible="1"/>
                                        <label for="use_parent_address" class="oe_edit_only" invisible="1"/>
                                        <field name="street" placeholder="Street..." />
                     <!-- many other fields -->
                                </group>
                            </group>
                         </page>

<!-- other pages composing the notebook -->

                        <page string="Misc">
                            <group colspan="4" col="4">
                                <separator colspan="4" string="Patient Extra Information"/>
                                  <field name="general_info" nolabel="1"  colspan="4"/>
                            </group>
                            <newline/>
                            <group colspan="4" col="6">
                                <field name="deceased"/>
                                <field name="dod" attrs="{'invisible':[('deceased','=',False)],'required':[('deceased','=',True)]}"/>
                                <field name="cod" attrs="{'invisible':[('deceased','=',False)]}"/>
                            </group>
                        </page>

<!-- some other code -->

                    </notebook>
                 </sheet>
                 </form>
             </field>
         </record>

    </data>
</openerp>

And here is the code of the inherited view :

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>

        <record model="ir.ui.view" id="view_oemedical_patient_form_radio_logy">
            <field name="name">oemedical.patient.view.inherit.radio_logy</field>
            <field name="model">oemedical.patient</field>
            <field name="inherit_id" ref="oemedical.view_oemedical_patient_form" />
            <field name="type">form</field>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//notebook/page[@string='Misc']" position="before">
                        <page string="Radiology" id="page_radiology">
                            <notebook>
                                <page string="Main" id="page_ses_main">
                                    <group colspan="4" col="4" id="group_ses_holder2">
                                        <field name="ses"/>
                                        <field name="housing"/>
                                        <field name="education"/>
<!--                                        <field name="occupation"/>-->
                                    </group>
                                    <newline/>

<!-- other groups -->

                                </page>
                            </notebook>
                        </page>
                    </xpath>
                </data>
            </field>
        </record>

    </data>
</openerp>

Everything remains the same, no errors, nothing, the original view is not affected.. I tried to create a new database for my openerp and to re-install the module on it but nothing changed..

Any help please ?!

0
Avatar
Descartar
Avatar
Koffi KPONOUGLO
Mejor respuesta

Before iherit view you have to the exact view_id by reading code or using web client (Setting -> Technical -> User Interface -> Views). You have and simple option whose consiste to activate the developper mode(Right Top of screen -> User Name -> About Odoo -> Activate developper mode). By doing this the Deboguer field will appear on every view.

After this, go the view you want to ihnerit   and choose option manage views in Deboguer field . You will get the way to inherit easly your view.

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 to create another type of Invoice with other sequence?
view inherit
Avatar
0
mar 15
4853
Inherit a predefined view.
view inherit
Avatar
Avatar
1
mar 15
6459
v16: inherit view and add editable treeview in notebook
view inherit odoo16features
Avatar
1
nov 23
2111
Creating new view from a old view Resuelto
view res.partner inherit
Avatar
Avatar
11
ene 24
14408
Why the same domain for the same field doesn't work at both places?
domain view inherit
Avatar
Avatar
Avatar
Avatar
Avatar
7
ago 18
6991
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