Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
5692 Tampilan

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

Avatar
Buang
Jawaban Terbai

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.

Avatar
Buang
Jawaban Terbai

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

</field>-->

Avatar
Buang
Penulis Jawaban Terbai

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Jul 25
316
2
Des 23
1604
0
Mar 15
4768
0
Nov 23
1252
4
Apr 23
13441