diff --git a/addons/hr_payroll/i18n/pl.po b/addons/hr_payroll/i18n/pl.po
index aa61a5592a7..1b3621cf2d5 100644
--- a/addons/hr_payroll/i18n/pl.po
+++ b/addons/hr_payroll/i18n/pl.po
@@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2012-12-16 12:00+0000\n"
+"PO-Revision-Date: 2014-02-08 18:26+0000\n"
"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) \n"
"Language-Team: Polish \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-01-28 06:26+0000\n"
-"X-Generator: Launchpad (build 16914)\n"
+"X-Launchpad-Export-Date: 2014-02-09 06:19+0000\n"
+"X-Generator: Launchpad (build 16916)\n"
#. module: hr_payroll
#: field:hr.payslip.line,condition_select:0
@@ -87,7 +87,7 @@ msgstr "Reguła wynagrodzenia nadrzędnego"
#: field:hr.payslip.run,slip_ids:0
#: model:ir.actions.act_window,name:hr_payroll.act_hr_employee_payslip_list
msgid "Payslips"
-msgstr "Pasek wypłaty"
+msgstr "Paski wypłaty"
#. module: hr_payroll
#: field:hr.payroll.structure,parent_id:0
@@ -132,7 +132,7 @@ msgstr "do"
#: view:hr.payslip.run:0
#: model:ir.model,name:hr_payroll.model_hr_payslip_run
msgid "Payslip Batches"
-msgstr "Grupy pasków"
+msgstr "Listy płac"
#. module: hr_payroll
#: view:hr.payslip.employees:0
@@ -183,7 +183,7 @@ msgstr "Suma"
#. module: hr_payroll
#: model:ir.actions.act_window,name:hr_payroll.act_children_salary_rules
msgid "All Children Rules"
-msgstr ""
+msgstr "Wszystkie reguły podrzędne"
#. module: hr_payroll
#: view:hr.payslip:0
@@ -194,7 +194,7 @@ msgstr "Dane wejściowe"
#. module: hr_payroll
#: constraint:hr.payslip:0
msgid "Payslip 'Date From' must be before 'Date To'."
-msgstr ""
+msgstr "'Data od' musi być wcześniejsza niż 'Data do'."
#. module: hr_payroll
#: view:hr.salary.rule.category:0
diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py
index cb1dd54e902..e6c94b4245f 100644
--- a/addons/hr_recruitment/__openerp__.py
+++ b/addons/hr_recruitment/__openerp__.py
@@ -37,13 +37,14 @@ You can define the different phases of interviews and easily rate the applicant
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
- 'images': ['images/hr_recruitment_analysis.jpeg','images/hr_recruitment_applicants.jpeg'],
+ 'images': ['images/hr_recruitment_analysis.jpeg','images/hr_recruitment_applicants.jpeg','static/src/img/down1.png'],
'depends': [
'decimal_precision',
'hr',
'survey',
'calendar',
'fetchmail',
+ 'web_kanban_gauge',
],
'data': [
'wizard/hr_recruitment_create_partner_job_view.xml',
@@ -58,7 +59,11 @@ You can define the different phases of interviews and easily rate the applicant
'hr_recruitment_data.xml',
],
'demo': ['hr_recruitment_demo.xml'],
+ 'js': [
+ 'static/src/js/job_position.js',
+ ],
'test': ['test/recruitment_process.yml'],
+ 'css':['static/src/css/job_position.css'],
'installable': True,
'auto_install': False,
'application': True,
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 89dd592e032..05c39147cf9 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -19,12 +19,10 @@
#
##############################################################################
-from openerp import tools
-
from datetime import datetime
from openerp.osv import fields, osv
from openerp.tools.translate import _
-from openerp.tools import html2plaintext
+
AVAILABLE_PRIORITIES = [
('', ''),
@@ -246,7 +244,8 @@ class hr_applicant(osv.Model):
if job_id:
job_record = self.pool.get('hr.job').browse(cr, uid, job_id, context=context)
department_id = job_record and job_record.department_id and job_record.department_id.id or False
- return {'value': {'department_id': department_id}}
+ user_id = job_record and job_record.user_id and job_record.user_id.id or False
+ return {'value': {'department_id': department_id, 'user_id': user_id}}
def onchange_department_id(self, cr, uid, ids, department_id=False, stage_id=False, context=None):
if not stage_id:
@@ -331,19 +330,12 @@ class hr_applicant(osv.Model):
value = self.pool.get("survey").action_print_survey(cr, uid, ids, context=context)
return value
- def action_get_attachment_tree_view(self, cr, uid, ids, context):
- domain = ['&', ('res_model', '=', 'hr.applicant'), ('res_id', 'in', ids)]
- 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'}" % (self._name)
- }
+ def action_get_attachment_tree_view(self, cr, uid, ids, context=None):
+ model, action_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'action_attachment')
+ action = self.pool.get(model).read(cr, uid, action_id, context=context)
+ action['context'] = {'default_res_model': self._name, 'default_res_id': ids[0]}
+ action['domain'] = str(['&', ('res_model', '=', self._name), ('res_id', 'in', ids)])
+ return action
def message_get_suggested_recipients(self, cr, uid, ids, context=None):
recipients = super(hr_applicant, self).message_get_suggested_recipients(cr, uid, ids, context=context)
@@ -364,7 +356,7 @@ class hr_applicant(osv.Model):
val = msg.get('from').split('<')[0]
defaults = {
'name': msg.get('subject') or _("No Subject"),
- 'partner_name':val,
+ 'partner_name': val,
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'user_id': False,
@@ -378,13 +370,20 @@ class hr_applicant(osv.Model):
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
+ context['mail_create_nolog'] = True
if vals.get('department_id') and not context.get('default_department_id'):
context['default_department_id'] = vals.get('department_id')
-
+ if vals.get('job_id') or context.get('default_job_id'):
+ job_id = vals.get('job_id') or context.get('default_job_id')
+ vals.update(self.onchange_job(cr, uid, [], job_id, context=context)['value'])
obj_id = super(hr_applicant, self).create(cr, uid, vals, context=context)
applicant = self.browse(cr, uid, obj_id, context=context)
if applicant.job_id:
- self.pool.get('hr.job').message_post(cr, uid, [applicant.job_id.id], body=_('Applicant created'), subtype="hr_recruitment.mt_job_new_applicant", context=context)
+ name = applicant.partner_name if applicant.partner_name else applicant.name
+ self.pool['hr.job'].message_post(
+ cr, uid, [applicant.job_id.id],
+ body=_('New application from %s') % name,
+ subtype="hr_recruitment.mt_job_applicant_new", context=context)
return obj_id
def write(self, cr, uid, ids, vals, context=None):
@@ -404,6 +403,15 @@ class hr_applicant(osv.Model):
else:
res = super(hr_applicant, self).write(cr, uid, ids, vals, context=context)
+ # post processing: if job changed, post a message on the job
+ if vals.get('job_id'):
+ for applicant in self.browse(cr, uid, ids, context=None):
+ name = applicant.partner_name if applicant.partner_name else applicant.name
+ self.pool['hr.job'].message_post(
+ cr, uid, [vals['job_id']],
+ body=_('New application from %s') % name,
+ subtype="hr_recruitment.mt_job_applicant_new", context=context)
+
# post processing: if stage changed, post a message in the chatter
if vals.get('stage_id'):
stage = self.pool['hr.recruitment.stage'].browse(cr, uid, vals['stage_id'], context=context)
@@ -444,7 +452,7 @@ class hr_applicant(osv.Model):
address_id = self.pool.get('res.partner').address_get(cr, uid, [applicant.partner_id.id], ['contact'])['contact']
contact_name = self.pool.get('res.partner').name_get(cr, uid, [applicant.partner_id.id])[0][1]
if applicant.job_id and (applicant.partner_name or contact_name):
- applicant.job_id.write({'no_of_recruitment': applicant.job_id.no_of_recruitment - 1})
+ applicant.job_id.write({'no_of_hired_employee': applicant.job_id.no_of_hired_employee + 1}, context=context)
emp_id = hr_employee.create(cr, uid, {'name': applicant.partner_name or contact_name,
'job_id': applicant.job_id.id,
'address_home_id': address_id,
@@ -454,6 +462,10 @@ class hr_applicant(osv.Model):
'work_phone': applicant.department_id and applicant.department_id.company_id and applicant.department_id.company_id.phone or False,
})
self.write(cr, uid, [applicant.id], {'emp_id': emp_id}, context=context)
+ self.pool['hr.job'].message_post(
+ cr, uid, [applicant.job_id.id],
+ body=_('New Employee %s Hired') % applicant.partner_name if applicant.partner_name else applicant.name,
+ subtype="hr_recruitment.mt_job_applicant_hired", context=context)
else:
raise osv.except_osv(_('Warning!'), _('You must define an Applied Job and a Contact Name for this applicant.'))
@@ -490,16 +502,37 @@ class hr_job(osv.osv):
_inherit = "hr.job"
_name = "hr.job"
_inherits = {'mail.alias': 'alias_id'}
+
+ def _get_attached_docs(self, cr, uid, ids, field_name, arg, context=None):
+ res = {}
+ attachment_obj = self.pool.get('ir.attachment')
+ for job_id in ids:
+ applicant_ids = self.pool.get('hr.applicant').search(cr, uid, [('job_id', '=', job_id)], context=context)
+ res[job_id] = attachment_obj.search(
+ cr, uid, [
+ '|',
+ '&', ('res_model', '=', 'hr.job'), ('res_id', '=', job_id),
+ '&', ('res_model', '=', 'hr.applicant'), ('res_id', 'in', applicant_ids)
+ ], context=context)
+ 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"),
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="restrict", required=True,
help="Email alias for this job position. New emails will automatically "
"create new applicants for this job position."),
'address_id': fields.many2one('res.partner', 'Job Location', help="Address where employees are working"),
+ 'application_ids': fields.one2many('hr.applicant', 'job_id', 'Applications'),
+ 'manager_id': fields.related('department_id', 'manager_id', type='many2one', string='Department Manager', relation='hr.employee', readonly=True, store=True),
+ 'document_ids': fields.function(_get_attached_docs, type='one2many', relation='ir.attachment', string='Applications'),
+ 'user_id': fields.many2one('res.users', 'Recruitment Responsible', track_visibility='onchange'),
+ 'color': fields.integer('Color Index'),
}
+
def _address_get(self, cr, uid, context=None):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.company_id.partner_id.id
+
_defaults = {
'address_id': _address_get
}
@@ -541,6 +574,18 @@ class hr_job(osv.osv):
'nodestroy': True,
}
+ def action_get_attachment_tree_view(self, cr, uid, ids, context=None):
+ #open attachments of job and related applicantions.
+ model, action_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'action_attachment')
+ action = self.pool.get(model).read(cr, uid, action_id, context=context)
+ applicant_ids = self.pool.get('hr.applicant').search(cr, uid, [('job_id', 'in', ids)], context=context)
+ action['context'] = {'default_res_model': self._name, 'default_res_id': ids[0]}
+ action['domain'] = str(['|', '&', ('res_model', '=', 'hr.job'), ('res_id', 'in', ids), '&', ('res_model', '=', 'hr.applicant'), ('res_id', 'in', applicant_ids)])
+ return action
+
+ def action_set_no_of_recruitment(self, cr, uid, id, value, context=None):
+ return self.write(cr, uid, [id], {'no_of_recruitment': value}, context=context)
+
class applicant_category(osv.osv):
""" Category of applicant """
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index 76f3d3b72be..8a88d8ebe5f 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -495,13 +495,9 @@
jobs
+
-
-
- New Applicant
- hr.job
-
New Applicant
@@ -515,12 +511,35 @@
Stage changed
-
+
Applicant Hired
hr.applicant
Applicant hired
+
+
+ Applicant Created
+ hr.job
+
+
+ job_id
+
+
+ Applicant Stage Changed
+ hr.job
+
+
+ job_id
+
+
+ Applicant Hired
+ hr.job
+
+
+ job_id
+
+
Reserve
diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml
index 2dcd490b075..4cc17ae098f 100644
--- a/addons/hr_recruitment/hr_recruitment_menu.xml
+++ b/addons/hr_recruitment/hr_recruitment_menu.xml
@@ -1,7 +1,6 @@
-
######################## JOB OPPORTUNITIES (menu) ###########################
Applications
@@ -9,16 +8,15 @@
kanban,tree,form,graph,calendar
+ {'empty_list_help_model': 'hr.job'}
-
- Click to add a new job applicant.
+
+ OpenERP helps you track applicants in the recruitment
+ process and follow up all operations: meetings, interviews, etc.
- OpenERP helps you track applicants in the recruitment process
- and follow up all operations: meetings, interviews, etc.
- Candidates and their cv's are automatically created when they
- apply for a job. If you install the document management modules,
- all resumes are indexed automatically, so that you can easily
- search through their content in the recruitment menu.
+ Applicants and their attached CV are created automatically when an email is sent.
+ If you install the document management modules, all resumes are indexed automatically,
+ so that you can easily search through their content.
@@ -58,15 +56,10 @@
sequence="1"/>
-
+
-
-
-
-
-
+ id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="2"/>
diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml
index eb823364e96..c9dc0d04ffb 100644
--- a/addons/hr_recruitment/hr_recruitment_view.xml
+++ b/addons/hr_recruitment/hr_recruitment_view.xml
@@ -34,7 +34,7 @@
-
+
Applicants
hr.applicant
@@ -91,10 +91,10 @@
+
-