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

Validating error in xml

By
sridhar
on 4/16/13, 9:38 AM 1,629 views

Hi i'm new for OpenERP 7 i creating a inherit module to add two fields but i can't create here i submit my code, why this error will come

class hr_requirement_ext(osv.osv):
    _name = 'hr.requirement.ext'
    _description = 'Extension of the Reqirement process'
    _inherit = ['hr.applicant']
    _columns ={
        'doj':fields.date('Date of Birth'),
        'presentsal':fields.integer('Present Salary', size=16),
    }
hr_requirement_ext()

its xml file is here.

<?xml version="1.0"?>
<openerp>
<data>
<record model = "ir.ui.view" id ="hr_requirement_ext_form" >
    <field name ="name">hr.requirement.ext</field>
    <field name = "model"> hr.requirement.ext </field>
    <field name = "inherit_id" ref ="hr_recruitment.crm_case_form_view_job"/>
    <field name = "arch" type = "xml">
    <field name="job_id" position="before">-->
            <field name = "doj"/>
            <field name = "presentsal"/>
    </field>-->
    </field>
</record>
</data>
</openerp>

error message is " File "/opt/openerp/server/openerp/osv/orm.py", line 1544, in _validate raise except_orm('ValidateError', '\n'.join(error_msgs)) except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')" help me for this problem

Thanks and regards Sridharan G Chennai

1
jamesbale
On 4/16/13, 10:23 AM

remove --> arrow from your code in xml then it will work

</field>-->

1

Sudhir Arya (SA)

--Sudhir Arya (SA)--
10150
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

Sudhir Arya (SA)
On 4/16/13, 9:56 AM

I am suspecting _inherit = ['hr.applicant'] it should be _inherit = 'hr.applicant'.

And there are --> arrow in your xml.

Try to remove them and then restart your server and update your module.

0
sridhar
On 4/17/13, 1:55 AM

Hi I try these two steps yet now same problem, help me.

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: 4/16/13, 9:38 AM
Seen: 1629 times
Last updated: 3/16/15, 8:10 AM