Odoo Help

Welcome!

This community 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.

0

arch: Invalid XML for View Architecture Errooor

By
Hachem Chraiti
on 4/2/14, 8:31 PM 1,912 views

Hi everyone,im gettin an error ,who can helpe me please?

--universite.xml-: <openerp> <data>

<record id="pos_universite_form" model="ir.ui.view"> <field name="name">pos.universite.form</field> <field name="model">pos.universite</field> <field name="arch" type="xml"> <form string="universite" version="7.0">
<group col="4">
<field name="universite_name"/> <field name="universite_pays"/> <field name="pos_universite_id"/>
</group> </form> </field> </record>

<record id="pos_universite_tree" model="ir.ui.view"> <field name="name">pos.universite.tree</field> <field name="model">pos.universite</field> <field name="arch" type="xml"> <tree string="universite"> <field name="universite_name"/> <field name="pos_universite_id" ref="pos.universite.name"/>
</tree> </field> </record> <record model="ir.ui.view" id="pos_universite_search"> <field name="name">pos.universite.search</field> <field name="model">pos.universite</field> <field name="arch" type="xml"> <search string="universite Management"> <field name="funiversite_name"/> <filter name="filter_see_all" string="All" domain="['|', ('active', '=',True), ('active', '=',False)]"/> <filter name="filter_see_active" string="Active" domain="[('active', '=',True)]"/> <filter name="filter_see_inactive" string="Inactive" domain="[('active', '=',False)]"/> </search> </field> </record>

<menuitem name="Faculty Management" id="menu_point_root" sequence="30"/>

<record model="ir.actions.act_window" id="action_pos_universite"> <field name="name">universityItem</field> <field name="type">ir.actions.act_window</field> <field name="res_model">pos.universite</field> <field name="view_type">form</field> <field name="view_mode">tree,form</field> <field name="view_id" ref="pos_universite_tree"/> <field name="context">{"search_default_filter_see_all":1}</field> <field name="help" type="html">

Click here to create a universities for Hachem.

</field> </record>


<menuitem name="Universities Menu" id="menu_point_root_universities" parent="menu_point_root" sequence="17" <="" p="">

          />
<menuitem
        id="menu_action_pos_university"
        parent="menu_point_root_universities"
        action="action_pos_university"    
        />
<!-- # -->

 </data>

</openerp>

--pos_universite class --: from openerp.osv import fields, osv

class pos_universite(osv.osv): _name = 'pos.universite' _columns = { 'pos_universite_id' : fields.integer('ID University',size=64), 'universite_name': fields.char('Nom de la university', size=128, required=True), 'universite_pays': fields.char('Lieu de la university', size=128, required=True), }

_defaults = {
    'universite_name' : '',
    'universite_pays': 'Tunisie',
    }

pos_universite()

--and the error is : except_orm('ValidateError', '\n'.join(error_msgs)) except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')

0

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 4/3/14, 2:21 AM

Hi

Try this

<openerp> <data> <record id="pos_universite_form" model="ir.ui.view"> <field name="name">pos.universite.form</field> <field name="model">pos.universite</field> <field name="arch" type="xml"> <form string="universite" version="7.0"> <group col="4"> <field name="universite_name"/> <field name="universite_pays"/> <field name="pos_universite_id"/> </group> </form> </field> </record>

    <record id="pos_universite_tree" model="ir.ui.view">
        <field name="name">pos.universite.tree</field> 
        <field name="model">pos.universite</field>
        <field name="arch" type="xml">
            <tree string="Packaging">
                <field name="universite_name"/> 
                <field name="pos_universite_id" ref="pos.universite.name"/>
            </tree>
        </field>
    </record>


    <record model="ir.ui.view" id="pos_universite_search"> 
    <field name="name">pos.universite.search</field> 
    <field name="model">pos.universite</field> 
    <field name="arch" type="xml"> 
        <search string="universite Management"> 
            <field name="funiversite_name"/> 
            <filter name="filter_see_all" string="All" domain="['|', ('active', '=',True), ('active', '=',False)]"/> 
            <filter name="filter_see_active" string="Active" domain="[('active', '=',True)]"/> 
            <filter name="filter_see_inactive" string="Inactive" domain="[('active', '=',False)]"/> 
        </search> 
    </field> 
    </record>

<menuitem name="Faculty Management" id="menu_point_root" sequence="30"/>

<record model="ir.actions.act_window" id="action_pos_universite"> 
    <field name="name">universityItem</field>
    <field name="type">ir.actions.act_window</field> 
    <field name="res_model">pos.universite</field> 
    <field name="view_type">form</field> 
    <field name="view_mode">tree,form</field> 
    <field name="view_id" ref="pos_universite_tree"/> 
    <field name="context">{"search_default_filter_see_all":1}</field> 
    <field name="help" type="html">

        Click here to create a universities for Hachem.
    </field> 
</record>


<menuitem name="Universities Menu" id="menu_point_root_universities" parent="menu_point_root" sequence="17"  />
<menuitem
        id="menu_action_pos_university"
        parent="menu_point_root_universities"
        action="action_pos_university"    
        />
<!-- # -->

</data> </openerp>

error is : openerp.addons.base.ir.ir_ui_view: Can't render view for model: pos.university AttributeError: 'NoneType' object has no attribute 'fields_view_get' !!!!

Hachem Chraiti
on 4/3/14, 6:13 AM
0
Hachem Chraiti
On 4/3/14, 6:13 AM

error is : openerp.addons.base.ir.ir_ui_view: Can't render view for model: pos.university AttributeError: 'NoneType' object has no attribute 'fields_view_get' !!!!

0

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--Med Said BARA--
Med Said BARA
On 4/2/14, 9:15 PM

Hi;

The XML: copy paste and adjust indentation, verify also the end line caracters (Unix CR or Dos CR LF), I've deleted "<="" p="">" after sequence = 17.

<?xml version="1.0" encoding="UTF-8"?>
<openerp> 
   <data>
     <record id="pos_universite_form" model="ir.ui.view"> 
        <field name="name">pos.universite.form</field> 
        <field name="model">pos.universite</field> <field name="arch" type="xml"> 
            <form string="universite" version="7.0">
                <group col="4">
                    <field name="universite_name"/> 
                    <field name="universite_pays"/> 
                    <field name="pos_universite_id"/>
                </group> 
            </form> 
        </field> 
    </record>

    <record id="pos_universite_tree" model="ir.ui.view"> 
        <field name="name">pos.universite.tree</field> 
        <field name="model">pos.universite</field> 
        <field name="arch" type="xml"> <tree string="universite"> 
                <field name="universite_name"/> <field name="pos_universite_id" ref="pos.universite.name"/>
            </tree> </field> </record> <record model="ir.ui.view" id="pos_universite_search"> 
        <field name="name">pos.universite.search</field> 
        <field name="model">pos.universite</field> 
        <field name="arch" type="xml"> <search string="universite Management"> 
                <field name="funiversite_name"/> <filter name="filter_see_all" string="All" domain="['|', ('active', '=',True), ('active', '=',False)]"/> 
                <filter name="filter_see_active" string="Active" domain="[('active', '=',True)]"/> 
                <filter name="filter_see_inactive" string="Inactive" domain="[('active', '=',False)]"/> 
            </search> 
        </field> 
    </record>

    <menuitem name="Faculty Management" id="menu_point_root" sequence="30"/>

    <record model="ir.actions.act_window" id="action_pos_universite"> 
        <field name="name">universityItem</field>
        <field name="type">ir.actions.act_window</field> 
        <field name="res_model">pos.universite</field> 
        <field name="view_type">form</field> 
        <field name="view_mode">tree,form</field> 
        <field name="view_id" ref="pos_universite_tree"/> 
        <field name="context">{"search_default_filter_see_all":1}</field> 
        <field name="help" type="html">

            Click here to create a universities for Hachem.
        </field> 
    </record>


    <menuitem name="Universities Menu" id="menu_point_root_universities" parent="menu_point_root" sequence="17"  />
    <menuitem
            id="menu_action_pos_university"
            parent="menu_point_root_universities"
            action="action_pos_university"    
            />
    <!-- # -->

</data>
</openerp>

Retry with this:

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

<openerp>
  <data>

    <record id="pos_universite_form" model="ir.ui.view">
        <field name="name">pos.universite.form</field>
        <field name="model">pos.universite</field>
        <field name="arch" type="xml">
            <form string="universite" version="7.0">
                <group col="4">
                    <field name="universite_name"/>
                    <field name="universite_pays"/>
                    <field name="pos_universite_id"/>
                </group>
            </form>
        </field>
    </record>

    <record id="pos_universite_tree" model="ir.ui.view">
        <field name="name">pos.universite.tree</field>
        <field name="model">pos.universite</field>
        <field name="arch" type="xml">
            <tree string="universite">
                <field name="universite_name"/> <field name="pos_universite_id" ref="pos.universite.name"/>
            </tree> </field> </record> <record model="ir.ui.view" id="pos_universite_search">
        <field name="name">pos.universite.search</field>
        <field name="model">pos.universite</field>
        <field name="arch" type="xml">
            <search string="universite Management">
                <field name="funiversite_name"/> <filter name="filter_see_all" string="All" domain="['|', ('active', '=',True), ('active', '=',False)]"/>
                <filter name="filter_see_active" string="Active" domain="[('active', '=',True)]"/>
                <filter name="filter_see_inactive" string="Inactive" domain="[('active', '=',False)]"/>
            </search>
        </field>
    </record>

    <menuitem name="Faculty Management" id="menu_point_root" sequence="30"/>

    <record model="ir.actions.act_window" id="action_pos_universite">
        <field name="name">universityItem</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">pos.universite</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <field name="view_id" ref="pos_universite_tree"/>
        <field name="context">{"search_default_filter_see_all":1}</field>
        <field name="help" type="html">
            Click here to create a universities for Hachem.
        </field>
    </record>


    <menuitem name="Universities Menu" id="menu_point_root_universities" parent="menu_point_root" sequence="17" />
    <menuitem id="menu_action_pos_university" parent="menu_point_root_universities" action="action_pos_university" />

 </data>
</openerp>

And this:

from openerp.osv import fields, osv

class pos_universite(osv.osv):

_name = 'pos.universite' 

_columns = {

    'pos_universite_id' : fields.integer('ID University', size=64),

    'universite_name' : fields.char('Nom de la university', size=128, required=True),

    'universite_pays' : fields.char('Lieu de la university', size=128, required=True),

}

_defaults = {

    'universite_name' : '',

    'universite_pays': 'Tunisie',

    }

pos_universite()

My advice, do not forget to check, the indentation, the end line caracters, and to delete the white spaces at the end of lines.

nothing changes!!! same error

Hachem Chraiti
on 4/2/14, 10:10 PM

Could you post more lines from you openerp-server.log ?

Med Said BARA
on 4/2/14, 10:26 PM
0
Hachem Chraiti
On 4/2/14, 10:10 PM

nothing changes!!! same error

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/2/14, 8:31 PM
Seen: 1912 times
Last updated: 3/16/15, 8:10 AM