i'm new in openerp coding part. i want to add a new field in hr.applicant. how can i use inheritance concept?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
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
2)
<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"/>
</form>
<field>
</record>
thanks
is this way to implement as a new module?
if any thing extra i need to add as create a new module for this?
yes u need to create __init__.py file and __openerp__.py file
Thanks for your reply.
if you are satify with answer then plz accept the answer
<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?
I create using the above code, but it shows error.
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Inscribirse