<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="1">
        <record id="hr_recruitment.group_hr_recruitment_interviewer" model="res.groups">
            <field name="implied_ids" eval="[Command.link(ref('survey.group_survey_user'))]"/>
            <field name="comment">It will also allow to send surveys and see the resume.</field>
        </record>
        <record id="survey.survey_user_input_rule_survey_user_read" model="ir.rule">
            <field name="name">Survey user input: officer: read all non private survey answers</field>
            <field name="domain_force">[('applicant_id', '=', False)]</field>
        </record>
        <record id="survey_user_input_rule_recruitment_interviewer" model="ir.rule">
            <field name="name">Survey user input: recruitment interview: read survey answers for which they are set as interviewer</field>
            <field name="model_id" ref="survey.model_survey_user_input"/>
            <field name="domain_force">[
                ('applicant_id', '!=', False),
                '|',
                    ('applicant_id.interviewer_ids', 'in', user.id),
                    ('applicant_id.job_id.interviewer_ids', 'in', user.id),
                ]</field>
            <field name="groups" eval="[(4, ref('hr_recruitment.group_hr_recruitment_interviewer'))]"/>
            <field name="perm_unlink" eval="0"/>
            <field name="perm_write" eval="0"/>
            <field name="perm_read" eval="1"/>
            <field name="perm_create" eval="0"/>
        </record>
    </data>
</odoo>
