3
votes

I try to create a module in OpenERP 7 , but I have this error "Error occurred while validating the field(s) arch: Invalid XML for View Architecture! " I spend many hours but i can resolve it. My code is:

init.py

import ig_nomfurn

openerp.py

  {
    'name': 'ig_nomfurn',
    'version': '1.0',
    'category': 'Generic Modules/Others',
    'description': """
    Partea de infogest transcrisa in OpenERP
    ========================================

    Porteaza o partea din functiunile infogest in OpenERP
    """,
    'author': 'bogdan @ nvncompany.ro',
    'depends': ['base'],
    'data': [
        'ig_nomfurn_view.xml',
    ],
    'installable': True,
    'auto_install': False,
    }

ig_nomfurn.py

from openerp.osv import fields, osv

class ig_nomfurn(osv.osv):
_name = 'ig.nomfurn'
_description = "nomfurn"
_columns = {
    'name': fields.char('Name', size=8),
}

ig_nomfurn_view.xml

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

<openerp>
<data>
    <menuitem id="ig_openerp_main" 
        name="Ig OpenERP"/>

    <menuitem id="ig_openerp"
        name="IG OpenERP"
        parent="ig_openerp_main"/>        

    <record id="view_ig_nomfurn" model="ir.ui.view">
        <field name="name">ig.nomfurn.form</field>
        <field name="model">ig.nomfurn</field>
        <field name="arch" type="xml">
            <form string="Create New Dashboard" version="7.0">
                <group colspan="4">
                    <field name="name"/>
                </group>
           </form>
        </field>
    </record>

    <record id="action_ig_nomfurn" model="ir.actions.act_window">
        <field name="name">View Boars</field>
        <field name="res_model">ig.nomfurn</field>
        <field name="view_type">form</field>
        <field name="view_mode">form</field>
       <field name="view_id" ref="view_ig_nomfurn"/>
       <field name="target">new</field>
    </record>

    <menuitem action="action_ig_nomfurn"
        id="ig_nomfurn" 
        name="Nomfurn"
        parent="ig_openerp"
        />
</data>
</openerp>
1
please add the error logOmaL
Hi, i got this error many times in my novice days. Actually this is not that hard to solve. Please see your error log (trace up). You'll find your error part of xml code and above that, the exact error description will be there. Try to see that you can easily solve any issue regarding to "Invalid XML for View Architecture". Good Luck!!Vivek

1 Answers

1
votes

cant find any issues.please try by adding ig_nomfurn() at the end of the class.