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
    • Conocimientos
    • 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

cant solve this error - ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture!

Suscribirse

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

Se marcó esta pregunta
2 Respuestas
6978 Vistas
Avatar
Praveen S

*__init__.py*

import person

__openerp__.py

{
    'name': 'Person Data Storage',
    'version': '2.0',
    'author': 'Praveen',
    'depends': ['base'],
    'data': [  # data files to load at module install
        'view/menu.xml',  
    ], 
    'demo': [],  # demo data (for unit tests)
} 

person.py

from osv import osv, fields

    class person(osv.Model):
        _name = 'person.person'
        _columns = 
{
                       'name': fields.char('Name', size = 100), 
                       'dob': fields.date('Date of birth'),
                       'father_name': fields.char('Father Name', size = 100),
}
     person()

menu.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
       <menuitem id="person_main_menu" name="Persons"/>



     <record id="person_person_tree_view" model="ir.ui.view">
        <field name="name">person.person.tree</field>
        <field name="model">person.person</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Persons">
                <field name="name"/>
                <field name="dob"/>
                <field name="father_name"/>
            </tree>
        </field>
    </record>

    <record id="person_person_form_view" model="ir.ui.view">
        <field name="name">person.person.form</field>
        <field name="model">person.person</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Persons">
                <field name="name"/>
                <field name="dob"/>
                <field name="father_name"/>
            </form>
        </field>
    </record>

    <record id="person_normal_action" model="ir.actions.act_window">
        <field name="name">Person</field>
        <field name="res_model">person.person</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
    </record>

    <menuitem id="section_main_menu" parent="person_main_menu" name = "View"/>
        <menuitem id="person_real_menu" parent="section_main_menu" action="person_normal_action"/>

    </data>
</openerp>
0
Avatar
Descartar
Avatar
Ghanshyam Prajapati
Mejor respuesta

Hey Praveen,

are you working in OpenERP 7 version??, If yes then you should do following changes,

  • Remove <field name="type">form</field> from form view.

  • Replcae <form string="Persons"> with <form string="Persons" version="7.0">

  • Replace from osv import osv, fields with from openerp.osv import osv, fields

from openerp.osv import osv, fields

person.py

class person(osv.Model):
    _name = 'person.person'
    _columns = {
       'name': fields.char('Name', size = 100), 
       'dob': fields.date('Date of birth'),
       'father_name': fields.char('Father Name', size = 100),
}

menu.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <menuitem id="person_main_menu" name="Persons"/>

         <record id="person_person_tree_view" model="ir.ui.view">
            <field name="name">person.person.tree</field>
            <field name="model">person.person</field>
            <field name="arch" type="xml">
                <tree string="Persons">
                    <field name="name"/>
                    <field name="dob"/>
                    <field name="father_name"/>
                </tree>
            </field>
        </record>

        <record id="person_person_form_view" model="ir.ui.view">
            <field name="name">person.person.form</field>
            <field name="model">person.person</field>
            <field name="arch" type="xml">
                <form string="Persons" version="7.0">
                    <group>
                        <field name="name"/>
                        <field name="dob"/>
                        <field name="father_name"/>
                    </group>
               </form>
            </field>
        </record>

        <record id="person_normal_action" model="ir.actions.act_window">
            <field name="name">Person</field>
            <field name="res_model">person.person</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <menuitem id="section_main_menu" parent="person_main_menu" name = "View"/>
        <menuitem id="person_real_menu" parent="section_main_menu" action="person_normal_action"/>

    </data>
</openerp>

Hope it work for you.

1
Avatar
Descartar
Praveen S
Autor

thanks Ghanshyam Prajapati for your replay the same error occurs after replacing all of the above

Ghanshyam Prajapati

Hi Praveen, if my answer solved your problem, then please mark this answer as solved, Thanks.

Ghanshyam Prajapati

have you updated your module, after made changes?? please restart your server and then update your module.

Praveen S
Autor

same error occurs when me try to install this module after replacing all of the above fields

Ghanshyam Prajapati

Hey Praveen I installed your module with my changes and its working fine. See my updated answer

Praveen S
Autor

but it doesn't work for me pls share your work files

Ghanshyam Prajapati

https://www.dropbox.com/s/fhor2fx6blp8onr/test_module.zip download my module. and please mark my answer as solved if your problem is solved, Thanks. :)

Praveen S
Autor

Your module was successfully working. But i didn't find the error in my module. If you know it pls help me.

Avatar
Alec Mouti
Mejor respuesta

I have been having that error problem for weeks now. I changed the view as suggested by many still no luck. I even removed openerp and installed the current release. I hope this thread can find solution to my problem.

0
Avatar
Descartar
Praveen S
Autor

is it worked for u

Alec Mouti

No, It did not work. I believe there is something else that is causing this error apart from xml views. example, I managed to install custom hotel management module in earlier opener 7.0 releases without problem. I then removed openerp and reinstalled the stable openerp 7.0 release. now I cannot install the same custom Hotel module because of this error. nothing has change regarding custom Module. this tells me that the problem might be a bug. thus why Ghanshyam Prajapati can install the same module while you cannot

Praveen S
Autor

Hi Alec Mouti, I got the solution when me deleted all the data regarding to the current module,delete the module from add ones and restarted the server. Then i copied the module to addone and updated then installed. Its now working. Hopes it will helps you too

sneha antony

I installed the same module with the updated code as a new module.But my issue is the module is not shown in the Installed Modules list though it is there in the addons folder of my openerp 7.What can be done to resolve this issue

¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
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