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

Finding difficulties in writing xml files for my custom module

By
umer farooq
on 1/22/14, 1:22 PM 1,002 views

hello, I am getting ValidateErrorError occurred while validating the field(s) arch: Invalid XML for View Architecture This is my code of custom module :custom_module.py from openerp.osv import fields, osv

class custom_project(osv.osv):

_inherit = "project.project"

_columns = {

'test': fields.integer('Test', size=11),
'test1':fields.char('umer', size=64)

}

_defaults ={ 'test': 0 }

_inherit = "project.task"

_columns = {

'test': fields.integer('Test', size=11),
'test1':fields.char('umer', size=64)

}

_defaults ={ 'test': 0 }

custom_project();

and I have Created 2 XML files one for project.project model and other for project.task model: For Project.Project model::::::::::::::::::::::: <openerp> <data> <record model="ir.ui.view" id="legacy_projects_project"> <field name="name">project.project.form</field> <field name="model">project.project</field> <field name="inherit_id" ref="project.edit_project"/> <field name="arch" type="xml"> <xpath expr="/form/sheet/group/group[2]/field[@name='partner_id']" position="after">

            <field name="test" />
            <field name="test1" />
        </xpath>
    </field>
</record>

</data> </openerp> and for Project.task model ::::::::::::::: <openerp> <data> <record model="ir.ui.view" id="legacy_projects_task"> <field name="name">project.task.form</field> <field name="model">project.task</field> <field name="inherit_id" ref="project.view_task_form2"/> <field name="arch" type="xml"> <xpath expr="/form/sheet/group/field[@name='categ_ids']" position="after">

            <field name="test" />
            <field name="test1" />
        </xpath>
    </field>
</record>

</data> </openerp>

What went wrong while writing these two xml files it's too creepy got stuck in it very badly please help me in it . Thanks

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: 1/22/14, 1:22 PM
Seen: 1002 times
Last updated: 3/16/15, 8:10 AM