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

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

By
bogdan baltatu
on 9/25/13, 5:03 AM 3,443 views

Hello I look at the code and find no error. Can someone help me please?

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

    <!-- Main form -->
    <record model="ir.ui.view" id="edit_nomfurn">
        <field name="name">Nomfurn</field>
        <field name="model">ig.nomfurn</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Nomfurn" version="7.0">
                <field name="cod_f"/>
            </form>
        </field>
    </record>

    <!-- Action -->
    <record id="action_nomfurn" model="ir.actions.act_window">
        <field name="name">View nomfurn</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">ig_nomfurn</field>
        <field name="view_type">form</field>
        <field name="view_mode">view,form</field>
        <field name="nomfurn" ref="edit_nomfurn"/>
    </record>

    <menuitem name="Nomprod" parent="ig_openerp" id="ig_nomprod" action="action_nomfurn"/>

</data>

</openerp> nomfurn.py

from openerp.osv import osv, fields
class ig_nomfurn(osv.osv):
_name='ig.nomfurn'
_description='Nomfurn'
_columns = {
    'cod_f' : fields.char('cod_f',size=10) ,
    }
ig_nomfurn()

__openerp__.py

{
"name" : "IG_OpenERP",
"version" : "1.0",
"author" : "bogdan @ ",
"website" : "",
"category" : "Generic Modules/Others",
"depends" : ["base"],
"description" : "IG DB to OpenERP",
"init_xml" : ["nomfurn_view.xml"],
"demo_xml" : [],
"update_xml" : [],
"active" : False,
"installable" : True,

}

Can you paste the whole traceback?

Andreas Brueckl
on 9/25/13, 5:29 AM
0
bogdan baltatu
On 9/25/13, 5:46 AM

I made changes and error still exists

nomfurn_view.xml

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

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

    <!-- Main form -->
    <record model="ir.ui.view" id="edit_nomfurn">
    <field name="name">Nomfurn</field>
    <field name="model">ig.nomfurn</field>
    <field name="arch" type="xml">
        <form string="Nomfurn" version="7.0">
            <field name="cod_f"/>
        </form>
    </field>
    </record>

    <!-- Action -->
    <record id="view_id" model="ir.actions.act_window">
        <field name="name">View nomfurn</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">ig.nomfurn</field>
        <field name="view_type">form</field>
        <field name="view_mode">view,form</field>
        <field name="nomfurn" ref="edit_nomfurn"/>
    </record>

    <menuitem name="Nomprod" parent="ig_openerp" id="ig_nomprod" action="action_nomfurn"/>

</data>

</openerp>

0

Andreas Brueckl

--Andreas Brueckl--
5056
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 9/25/13, 5:36 AM

Here are my comments:

  • Since version 7.0 the type field of ir.ui.view is not used anymore. You have to remove it in your view edit_nomfurn
  • In action_nomfurn the field nomfurn does not exist. Rename it to view_id or remove the whole line. Also in field res_model rename ig_nomfurn to ig.nomfurn

Try this:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
    <!-- Top menu item -->
    <menuitem name="IG-OpenERP" id="ig_openerp_main"/>
    <menuitem name="IG-OpenERP" parent="ig_openerp_main" id="ig_openerp"/>

    <!-- Main form -->
    <record model="ir.ui.view" id="edit_nomfurn">
        <field name="name">Nomfurn</field>
        <field name="model">ig.nomfurn</field>
        <field name="arch" type="xml">
            <form string="Nomfurn" version="7.0">
                <field name="cod_f"/>
            </form>
        </field>
    </record>

    <!-- Action -->
    <record id="action_nomfurn" model="ir.actions.act_window">
        <field name="name">View nomfurn</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">ig.nomfurn</field>
        <field name="view_type">form</field>
        <field name="view_mode">view,form</field>
    </record>

    <menuitem name="Nomprod" parent="ig_openerp" id="ig_nomprod" action="action_nomfurn"/>

</data>
</openerp>
0
 I think your error is in this line
  <field name="nomfurn" ref="edit_nomfurn"/>
Try to chnage this to this one
      <field name="view_id" ref="edit_nomfurn"/> 
Try this :   I hope it will help :D
  <record model="ir.actions.act_window" id="view_id">
       <field name="name">View nomfurn</field>
       <field name="res_model">ig.nomfurn</field>
       <field name="view_type">form</field>
       <field name="view_id" ref="edit_nomfurn"/> 
       <field name="view_mode">tree,form</field> 
    </record>

I made changes and error still exists

bogdan baltatu
on 9/25/13, 6:03 AM

I extract this from server log 2013-09-25 08:11:37,918 6472 ERROR nvncompany openerp.tools.convert: Parse error in file:///f:/OpenERP%207.0/Server/server/openerp/addons/ig_openerp/nomfurn_view.xml:9: <record model="ir.ui.view" id="edit_nomfurn"> <field name="name">Nomfurn</field> <field name="model">ig.nomfurn</field> <field name="arch" type="xml"> <form string="Nomfurn" version="7.0"> <field name="cod_f"/> </form> </field> </record>

bogdan baltatu
on 9/25/13, 6:12 AM

Again can you try this code: <record id="edit_nomfurn" model="ir.ui.view"> <field name="name">Nomfurn</field> <field name="model">ig.nomfurn</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="Nomfurn" version="7.0"> <sheet string="Nomfurn"> <field name="cod_f"/> </sheet> </form> </field> </record>

Lady Sharmane Udtuhan
on 9/25/13, 7:57 AM

I made changes and error still exists :(

bogdan baltatu
on 9/26/13, 4:28 AM

can you copy paste the error log. ?

Subhin P V
on 11/7/13, 8:25 AM

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

0 follower(s)

Stats

Asked: 9/25/13, 5:03 AM
Seen: 3443 times
Last updated: 3/16/15, 8:10 AM