<div class="oe_right oe_job_button_box" name="buttons"/>
<group>
<group name="job_data">
- <field name="department_id"/>
+ <field name="department_id" class="oe_inline"/>
<label for="no_of_recruitment"/>
<div>
<field name="no_of_recruitment" on_change="on_change_expected_employee(no_of_recruitment,no_of_employee)" class="oe_inline"/>
- <p>Currently, <field name="no_of_employee" groups="base.group_user" colspan="0" class="oe_inline"/> employees</p>
+ <p>Currently, <field name="no_of_employee" groups="base.group_user" colspan="0" class="oe_inline" style="padding-top: 1px"/> employees</p>
</div>
</group>
</group>
for applicant in applicant_obj.browse(cr, uid, applicant_ids, context=context):
res[applicant.job_id.id] += 1
return res
+
+ def _get_attached_docs(self, cr, uid, ids, field_name, arg, context):
+ res = {}
+ attachment = self.pool.get('ir.attachment')
+ for id in ids:
+ job_attachments = attachment.search(cr, uid, [('res_model', '=', 'hr.job'), ('res_id', '=', id)], context=context, count=True)
+ res[id] = (job_attachments or 0)
+ return res
_columns = {
'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"),
"create new applicants for this job position."),
'application_count': fields.function(_application_count, type='integer', string="Total Applications"),
'manager_id': fields.related('department_id', 'manager_id', type='many2one', string='Department Manager', relation='hr.employee', readonly=True, store=True),
+ 'doc_count':fields.function(_get_attached_docs, string="Number of documents attached", type='int')
}
def _auto_init(self, cr, context=None):
'nodestroy': True,
}
+ def attachment_tree_view(self, cr, uid, ids, context):
+ domain = ['&', ('res_model', '=', 'hr.job'), ('res_id', 'in', ids)]
+ res_id = ids and ids[0] or False
+ return {
+ 'name': _('Attachments'),
+ 'domain': domain,
+ 'res_model': 'ir.attachment',
+ 'type': 'ir.actions.act_window',
+ 'view_id': False,
+ 'view_mode': 'tree,form',
+ 'view_type': 'form',
+ 'limit': 80,
+ 'context': "{'default_res_model': '%s','default_res_id': %d}" % (self._name, res_id)
+ }
class applicant_category(osv.osv):
""" Category of applicant """
<label for="survey_id" groups="base.group_user"/>
<div groups="base.group_user">
<field name="survey_id" class="oe_inline" domain="[('type','=','Human Resources')]"/>
+ <button string="Print Interview" name="action_print_survey" type="object" attrs="{'invisible':[('survey_id','=',False)]}" class="oe_inline oe_link"/>
</div>
</group>
- <xpath expr="//group[@name='job_data']" position="after">
- <group name="group_alias"
- attrs="{'invisible': [('alias_domain', '=', False)]}">
- <label for="alias_name" string="Email Alias"/>
- <div name="alias_def">
+ <xpath expr="//field[@name='department_id']" position="after">
+ <label for="alias_name" string="Email Alias" attrs="{'invisible': [('alias_domain', '=', False)]}"/>
+ <div name="alias_def" attrs="{'invisible': [('alias_domain', '=', False)]}">
<field name="alias_id" class="oe_read_only oe_inline"
string="Email Alias" required="0"/>
<div class="oe_edit_only oe_inline" name="edit_alias" style="display: inline;" >
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
</div>
</div>
- </group>
</xpath>
<div name="buttons" position="inside">
<button string="Applications" name="%(action_hr_job_applications)d" type="action"/>
- <button string="Interview" name="action_print_survey" type="object" attrs="{'invisible':[('survey_id','=',False)]}"/>
+ <button name="attachment_tree_view" string="Documents" type="object"/>
</div>
</field>
</record>
<img src="/hr_recruitment/static/src/img/down1.png"/>
</div>
</t>
+ <div class="oe_kanban_job_list">
+ <a t-if="record.doc_count.raw_value" name="attachment_tree_view" type="object" style="margin-right: 10px"> <field name="doc_count"/> Documents</a>
+ </div>
<div class="oe_launch_recruitment">
<a t-if="record.survey_id.raw_value" data-name="action_print_survey" data-type="object" class="oe_kanban_action">Print Interview</a>
<a t-if="record.survey_id.raw_value"> | </a>
<field name="context">{'search_default_in_recruitment': 1}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
- Click here to create a new job or remove the filter on On Recruitment. Define job position profile and manage all your recruitment in a context of a particular job: print interview survey, define number of expected new employees, and manage its recruitment pipe
+ Click here to create a new job or remove the filter on "On Recruitment" to recruit for an on hold job.
+ </p>
+ <p>
+ Define job position profile and manage recruitment in a context of a particular job: print interview survey, define number of expected new employees, and manage its recruitment pipe
</p>
</field>
</record>
}
.openerp .oe_job_messages{
margin-top: 40px !important;
-}
\ No newline at end of file
+}
+.openerp .oe_kanban_job_list > a:hover{
+ margin: 4px 0;
+ text-decoration: underline !important;
+}