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

How to debug view XML when openerp doesn't say anything about it?

By
DisturbedOne
on 8/19/14, 8:48 AM 1,675 views

I'm new to openerp and using version 7. I'm trying to create a new module using the instructions from the link below:

http://acespritechblog.wordpress.com/2012/05/22/how-to-create-a-module-in-openerp/

But when i try to install the module all i'm getting is "Error occurred while validating the field(s) arch: Invalid XML for View Architecture!" is there a way to debug this? What part of my view is wrong? Everything i did is the same with the link but here is the view XML anyway:

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

<openerp>
    <data>
       <record model="ir.ui.view" id="test_base_form">
           <field name="name">test.base.form</field>
               <field name="model">test.base</field>
               <field name="type">form</field>
               <field name="arch" type="xml">
                   <form string="Test Base">
                       <field name="name"/>
                       <field name="code"/>
                   </form>
              </field>
        </record>

        <record model="ir.ui.view" id="test_base_tree">
            <field name="name">test.base.tree</field>
            <field name="model">test.base</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Test Base">
                    <field name="name"/>
                    <field name="code"/>
                </tree>
            </field>
        </record>

        <record model="ir.actions.act_window" id="action_test_seq">
            <field name="name">Test Base</field>
            <field name="res_model">test.base</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <menuitem id="menu_test_base_main" name="Test Base"/>
        <menuitem id="menu_test_base" parent="menu_test_base_main" name="Test Base" action="action_test_seq"/>

    </data>
</openerp>

0
Timo Goosen
On 8/19/14, 9:58 AM

Did you try to restart openerp?

 

In Debian/Ubuntu Linux just do:

$ sudo service openerp restart

 

Then login and find the module and click upgrade.  Sometimes openerp/postgresql needs to first restart before your xml files are recognised.

It actually worked thanks but i can't mark your answer as the correct one because of my karma i guess.

DisturbedOne
on 8/19/14, 10:35 AM
0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 9/8/14, 3:08 AM

Hi..

Your xml looks fine... just check wether your python objects are loaded.. check whether py files are imported in __init__.py...

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: 8/19/14, 8:48 AM
Seen: 1675 times
Last updated: 3/16/15, 8:10 AM