This question has been flagged
2 Replies
10134 Views

Hello, I'm sorry, how can I add a new text field to the existing data of an article with openerp 7.

Avatar
Discard
Best Answer

same question at https://accounts.openerp.com/forum/Help-1/question/16222

where the question includes a list of places to learn how to add fields.

Avatar
Discard
Best Answer
{
    'name': 'HR Recruitment Extensionssss',
    'version': '1.1',
    'category': 'Generic Modules',
    'description': """
    After Applicantis hired it will automatically fetch value from Applicants to Employee master
       """,
    'author': 'Sridhar',
    'depends': ['base','hr','hr_recruitment'],
    'update_xml': ['hr_reqiurement_ext_view.xml'],
    'installable': True,
    'active': False,
}

save as a __openerp__.py

class hr_applicant(osv.osv):
    _inherit = 'hr.applicant'
    _columns = {
        'doj':fields.date('Date of Birth'),
        'presentsal':fields.integer('Present Salary'),
    }
hr_applicant()

save hr_recruitment_ext.py

<?xml version="1.0"?>
<openerp>
    <data>
    <record model="ir.ui.view" id="hr_recruitment_ext_form">
        <field name="name">hr.applicant</field>
        <field name="model">hr.applicant</field>
        <field name="type">form</field>
        <field name="inherit_id" ref="hr_recruitment.crm_case_form_view_job"/>
        <field name="arch" type="xml">
            <field name="partner_id" position="before">
                   <field name="doj"/>
                   <field name="presentsal"/>
           </field>
        </field>
    </record>
    </data>
</openerp>

save hr_reqiurement_ext_view.xml

__init__.py import hr_recruitment_ext

Try this, add a extra field on applicant form. check it.

Avatar
Discard