Skip to Content
Menú
This question has been flagged
3 Respostes
5693 Vistes

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
Descartar
Best Answer

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
Descartar
Best Answer

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

</field>-->

Avatar
Descartar
Autor Best Answer

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

Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de jul. 25
317
2
de des. 23
1605
0
de març 15
4768
0
de nov. 23
1253
4
d’abr. 23
13442