Odoo Help


I want to add a new field in hr.applicant, how can i add using inheritance?

on 8/31/13, 5:33 AM 2,248 views

i'm new in openerp coding part. i want to add a new field in hr.applicant. how can i use inheritance concept?

Ali Ravani
On 8/31/13, 6:42 AM

first u have to inhert hr.applicant class in py file : 1)

from osv import osv, fields
class hr_applicant(osv.osv):
       _inherit = "hr.applicant"
      _columns = {
          'field1' : fields.char('name', size=246),

and then u have to inherit hr.applicant form / tree view in xml file


 <record model="ir.ui.view" id="crm_case_form_view_job">
        <field name="name">Jobs - Recruitment Form</field>
        <field name="model">hr.applicant</field>
        <field name="arch" type="xml">
          <field name="inherit_id" ref="crm.crm_case_form_view_job"/>
          <form string="Jobs - Recruitment Form" version="7.0">
                     <field name="field1"/>


is this way to implement as a new module?

on 8/31/13, 7:37 AM

if any thing extra i need to add as create a new module for this?

on 8/31/13, 7:39 AM

yes u need to create __init__.py file and __openerp__.py file

Ali Ravani
on 8/31/13, 8:25 AM

Thanks for your reply.

on 8/31/13, 11:10 AM

if you are satify with answer then plz accept the answer

Ali Ravani
on 9/11/13, 8:47 AM

<field name="inherit_id" ref="crm.crm_case_form_view_job"/> if i inherit another model, what will be the ref of that model? How can i find it?

on 9/13/13, 2:11 AM

I create using the above code, but it shows error.

on 11/7/13, 4:21 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 8/31/13, 5:33 AM
Seen: 2248 times
Last updated: 3/16/15, 8:10 AM