<?xml version="1.0"?>
<openerp>
<data noupdate="1">
        <!-- notify all employees of module installation -->
        <record model="mail.message" id="module_install_notification">
            <field name="model">mail.group</field>
            <field name="res_id" ref="mail.group_all_employees"/>
            <field name="type">notification</field>
            <field name="subtype_id" ref="mail.mt_comment"/>
            <field name="subject">Recruitment Process application installed!</field>
            <field name="body"><![CDATA[<p>Manage job positions and your company's recruitment process. This application is integrated with the Survey application to help you define interviews for different jobs.</p>
<p>You can automatically receive job application though an email gateway, see the Human Resources settings.</p>]]></field>
        </record>

    <!-- Meeting Types (for interview meetings) -->
    <record model="calendar.event.type" id="categ_meet_interview">
        <field name="name">Interview</field>
    </record>

    <!-- Templates for interest / refusing applicants -->
    <record id="applicant_refuse" model="email.template">
        <field name="name">Application refused</field>
        <field name="subject">Application refused</field>
        <field name="email_to">${object.email_from}</field>
        <field name="partner_to">${object.partner_id and object.partner_id.id or ''}</field>
        <field name="lang">${object.partner_id and object.partner_id.lang or ''}</field>
        <field name="model_id" ref="hr_recruitment.model_hr_applicant"/>
        <field name="user_signature" eval="0"/>
        <field name="body_html"><![CDATA[<p>Dear ${object.partner_name or 'applicant'},</p>
        <p>We thank you for your interest in our company and for your application.
        Unfortunately, your profile does not match with our needs or our recruitment
        campaign has reached its term.</p>
        <p>If you want more details, feel free to contact us by phone.</p>
        <p>Kind regards,</p>
        <br/>
         ${object.user_id and object.user_id.signature | safe or ''}]]></field>
    </record>

    <record id="applicant_interest" model="email.template">
        <field name="name">Application approved</field>
        <field name="subject">Application approved</field>
        <field name="email_to">${object.email_from}</field>
        <field name="partner_to">${object.partner_id and object.partner_id.id or ''}</field>
        <field name="lang">${object.partner_id and object.partner_id.lang or ''}</field>
        <field name="model_id" ref="hr_recruitment.model_hr_applicant"/>
        <field name="user_signature" eval="0"/>
        <field name="body_html"><![CDATA[<p>Dear ${object.partner_name or 'applicant'},</p>
        <p>Congrats! Your resume's got our interest!
        I will call you as soon as possible to make a 10 minutes phone interview and  plan a first meeting.</p>
        <p>If we can’t reach you or if you miss our call, feel free to reach me back on the number 001 312 349 3030
        If I do not answer, please let me a message with some schedules to call you back.</p>
        <p>Kind regards,</p>
        <br/>
         ${object.user_id.signature | safe}]]></field>
    </record>

        <!--    HR Recruitment Source        -->

    <record model="hr.recruitment.source" id="source_linkedin">
        <field name="name">LinkedIn</field>
    </record>
    <record model="hr.recruitment.source" id="source_monster">
        <field name="name">Monster</field>
    </record>
    <record model="hr.recruitment.source" id="source_word">
        <field name="name">Word of Mouth</field>
    </record>
    <record model="hr.recruitment.source" id="source_website_company">
        <field name="name">Company Website</field>
    </record>


        <!--    Resource(type_id)        -->

    <record model="hr.recruitment.degree" id="degree_graduate">
        <field name="name">Graduate</field>
        <field name="sequence">1</field>
    </record>
    <record model="hr.recruitment.degree" id="degree_bachelor">
        <field name="name">Bachelor Degree</field>
        <field name="sequence">2</field>
    </record>
    <record model="hr.recruitment.degree" id="degree_licenced">
        <field name="name">Master Degree</field>
        <field name="sequence">3</field>
    </record>
    <record model="hr.recruitment.degree" id="degree_bac5">
        <field name="name">Doctoral Degree</field>
        <field name="sequence">4</field>
    </record>

    <record model="hr.recruitment.stage" id="stage_job1">
        <field name="name">Initial Qualification</field>
        <field name="sequence">1</field>
    </record>
    <record model="hr.recruitment.stage" id="stage_job2">
        <field name="name">First Interview</field>
        <field name="template_id" ref="applicant_interest"/>
        <field name="sequence">2</field>
    </record>
    <record model="hr.recruitment.stage" id="stage_job3">
        <field name="name">Second Interview</field>
        <field name="sequence">3</field>
    </record>
    <record model="hr.recruitment.stage" id="stage_job4">
        <field name="name">Contract Proposed</field>
        <field name="sequence">4</field>
    </record>
    <record model="hr.recruitment.stage" id="stage_job5">
        <field name="name">Contract Signed</field>
        <field name="sequence">5</field>
        <field name="fold" eval="True"/>
    </record>
    <record model="hr.recruitment.stage" id="stage_job6">
        <field name="name">Refused</field>
        <field name="sequence">6</field>
        <field name="template_id" ref="applicant_refuse"/>
        <field name="fold" eval="True"/>
    </record>

    <record id="mail_alias_jobs" model="mail.alias">
        <field name="alias_name">jobs</field>
        <field name="alias_model_id" ref="model_hr_applicant"/>
        <field name="alias_user_id" ref="base.user_root"/>
        <field name="alias_parent_model_id" ref="model_hr_job"/>
    </record>

    <!-- Applicant-related subtypes for messaging / Chatter -->
    <record id="mt_applicant_new" model="mail.message.subtype">
        <field name="name">New Applicant</field>
        <field name="res_model">hr.applicant</field>
        <field name="default" eval="False"/>
        <field name="description">Applicant created</field>
    </record>
    <record id="mt_applicant_stage_changed" model="mail.message.subtype">
        <field name="name">Stage Changed</field>
        <field name="res_model">hr.applicant</field>
        <field name="default" eval="False"/>
        <field name="description">Stage changed</field>
    </record>
    <record id="mt_applicant_hired" model="mail.message.subtype">
        <field name="name">Applicant Hired</field>
        <field name="res_model">hr.applicant</field>
        <field name="default" eval="False"/>
        <field name="description">Applicant hired</field>
    </record>
    <!-- Job-related subtypes for messaging / Chatter -->
    <record id="mt_job_applicant_new" model="mail.message.subtype">
        <field name="name">Applicant Created</field>
        <field name="res_model">hr.job</field>
        <field name="default" eval="True"/>
        <field name="parent_id" eval="ref('mt_applicant_new')"/>
        <field name="relation_field">job_id</field>
    </record>
    <record id="mt_job_applicant_stage_changed" model="mail.message.subtype">
        <field name="name">Applicant Stage Changed</field>
        <field name="res_model">hr.job</field>
        <field name="default" eval="True"/>
        <field name="parent_id" eval="ref('mt_applicant_stage_changed')"/>
        <field name="relation_field">job_id</field>
    </record>
    <record id="mt_job_applicant_hired" model="mail.message.subtype">
        <field name="name">Applicant Hired</field>
        <field name="res_model">hr.job</field>
        <field name="default" eval="True"/>
        <field name="parent_id" eval="ref('mt_applicant_hired')"/>
        <field name="relation_field">job_id</field>
    </record>

    <!-- Applicant Categories(Tag) -->
    <record id="tag_applicant_reserve" model="hr.applicant_category">
        <field name="name">Reserve</field>
    </record>
    <record id="tag_applicant_manager" model="hr.applicant_category">
        <field name="name">Manager</field>
    </record>
    <record id="tag_applicant_it" model="hr.applicant_category">
        <field name="name">IT</field>
    </record>
    <record id="tag_applicant_sales" model="hr.applicant_category">
        <field name="name">Sales</field>
    </record>
</data>
</openerp>
