parent
0653e597f6
commit
8091ee95b7
|
@ -0,0 +1,24 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import hr_applicant_document
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,47 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
'name': 'Applicant Resumes and Letters',
|
||||
'version': '1.0',
|
||||
'category': 'Human Resources',
|
||||
'sequence': 25,
|
||||
'summary': 'Applicant Resumes and Letters',
|
||||
'description': """
|
||||
Manage Applicant Resumes and letters
|
||||
====================================
|
||||
This application allows you to keep resumes and letters with applicants.
|
||||
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'website': 'http://www.openerp.com',
|
||||
'images': ['images/hr_recruitment_analysis.jpeg','images/hr_recruitment_applicants.jpeg'],
|
||||
'depends': ['hr_recruitment','document'],
|
||||
'data': ['hr_applicant_document_view.xml'],
|
||||
'demo': [],
|
||||
'test': [],
|
||||
'installable': True,
|
||||
'auto_install': True,
|
||||
'application': True,
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,48 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from openerp import tools
|
||||
from openerp.addons.base_status.base_stage import base_stage
|
||||
from datetime import datetime
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools.translate import _
|
||||
from openerp.tools import html2plaintext
|
||||
class applicant_document(osv.osv):
|
||||
_name = 'hr.applicant'
|
||||
_inherit = 'hr.applicant'
|
||||
def _get_index_content(self, cr, uid, ids, fields, args, context=None):
|
||||
res = {}
|
||||
attachment_pool = self.pool.get('ir.attachment')
|
||||
for issue in self.browse(cr, uid, ids, context=context):
|
||||
res[issue.id] = 0
|
||||
attach_id = attachment_pool.search(cr, uid, [('res_model','=','hr.applicant'),('res_id','=',issue.id)])
|
||||
if attach_id:
|
||||
for attach in attachment_pool.browse(cr, uid, attach_id, context):
|
||||
res[issue.id] = attach.index_content
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'index_content': fields.function(_get_index_content, string='Index Content', \
|
||||
type="char",store=True),
|
||||
}
|
||||
applicant_document()
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_tree_view_job_inherit">
|
||||
<field name="name">Applicants</field>
|
||||
<field name="model">hr.applicant</field>
|
||||
<field name="inherit_id" ref="hr_recruitment.crm_case_tree_view_job" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="user_id" position="after">
|
||||
<field name="index_content" invisible="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_crm_case_jobs_filter_inherit" model="ir.ui.view">
|
||||
<field name="name">Jobs - Recruitment Search</field>
|
||||
<field name="model">hr.applicant</field>
|
||||
<field name="inherit_id" ref="hr_recruitment.view_crm_case_jobs_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="job_id" position="before">
|
||||
<field name="index_content" string="Resume Content"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="hr_applicant_resumes">
|
||||
<field name="name">Resumes and Letters</field>
|
||||
<field name="res_model">ir.attachment</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="document.view_document_file_tree"/>
|
||||
<field name="domain">[('res_model','=','hr.applicant')]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Search through resumes and motivation letters.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Resumes and Letters"
|
||||
parent="base.menu_crm_case_job_req_main"
|
||||
id="menu_crm_case_categ0_act_job02" action="hr_applicant_resumes" sequence="3"/>
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
Loading…
Reference in New Issue