Odoo Help


Views problem. ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture!

Cela Shomana
on 6/10/14, 6:52 AM 1,213 views

hello good people. my quest to learn Odoo develpment has hit a stumbling block. I have read everything on the net about views but I cannot spot an error with my code while Odoo do. What is wrong with my code? help please. I get the  ValidateError  Error occurred while validating the field(s) arch: Invalid XML for View Architecture!  with the following code

.py code

from osv import fields, osv
import time
import netsvc
import datetime
from tools.translate import _

class studentdata_information(osv.osv):
    _name = "studentdata.information"
    _description = "Information"
    _columns = {
        'name': fields.char('Student Name', size=20, required=True, select=True),
        'age' : fields.integer('Age'),
        'agetwo' : fields.integer('Age Two'),
        'agethree' : fields.integer('Age Three'),
        'agefour' : fields.integer('Age Four'),   

view.xml code

<?xml version="1.0" encoding="utf-8"?>
    <menuitem id="studentdata_management_menu" name="studentdata" />
    <menuitem id="studentdata_information_menu" name="Configuration" sequence="20" parent ="studentdata_management_menu"/>
                                Student Information
        ==================================================== -->
        <record model="ir.ui.view" id="view_studentdata_information_form">
            <field name="name">studentdata.information.form</field>
            <field name="model">studentdata.information</field>
            <field name="arch" type="xml">
                <form string=" studentdata information" version="7.0">
                     <group colspan="2">
                        <field name="name" />
                        <group colspan="4" col="4">
                          <field name="age" />
                          <field name="agetwo"/>
                          <field name="agethree"/>
                          <field name="agefour"/>
        <record model="ir.ui.view" id="view_lodge_floor_tree">
            <field name="name">studentdata.information.tree</field>
            <field name="model">studentdata.information</field>
            <field name="arch" type="xml">
                <tree string=" studentdata information">
                    <field name="name" />
                    <field name="age" />
                    <field name="agetwo"/>
                    <field name="agethree"/>
                    <field name="agefour"/>
        <record model="ir.actions.act_window" id="open_studentdata_information_form_tree">
            <field name="name">Student Information</field>
            <field name="res_model">studentdata.information</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        <menuitem name="Students"


I have checked your code and everything is ok. you create a new database and install your module.
 It is better to use like following:
   from osv import fields, osv  =>  from openerp.osv import fields, osv
   from tools.translate import _ => from openerp.tools.translate import _

if you are changing anything in object or you are adding any new fields afterwards than you have to install that module back. For installing that module again you can try this command => ./openerp-server  -i your_module_name  -d your_database _name

hope this helps..


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/10/14, 6:52 AM
Seen: 1213 times
Last updated: 3/16/15, 8:10 AM