summaryrefslogtreecommitdiff
path: root/addons/hr_recruitment
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2014-07-06 16:44:26 +0200
committerAntony Lesuisse <al@openerp.com>2014-07-06 17:05:41 +0200
commitcbe2dbb672a6c55d86f2e515f9d1cdfee426ef80 (patch)
treed6ff62b719fce32392397783c961b734b1e4c50e /addons/hr_recruitment
parentd78192c489d3be66cd6487b39f5ce7ba4733a187 (diff)
[MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from bzr to git was not correctly done. The git history contains irrelevant blobs and commits. This branch brings a lot of changes and fixes, too many to list exhaustively. - New orm api, objects are now used instead of ids - Environements to encapsulates cr uid context while maintaining backward compatibility - Field compute attribute is a new object oriented way to define function fields - Shared browse record cache - New onchange protocol - Optional copy flag on fields - Documentation update - Dead code cleanup - Lots of fixes
Diffstat (limited to 'addons/hr_recruitment')
-rw-r--r--addons/hr_recruitment/hr_recruitment.py10
-rw-r--r--addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py4
2 files changed, 7 insertions, 7 deletions
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 832e2ad9e0e..7df4e73c85f 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -324,7 +324,7 @@ class hr_applicant(osv.Model):
return res
def action_start_survey(self, cr, uid, ids, context=None):
- context = context if context else {}
+ context = dict(context or {})
applicant = self.browse(cr, uid, ids, context=context)[0]
survey_obj = self.pool.get('survey.survey')
response_obj = self.pool.get('survey.user_input')
@@ -341,7 +341,7 @@ class hr_applicant(osv.Model):
def action_print_survey(self, cr, uid, ids, context=None):
""" If response is available then print this response otherwise print survey form (print template of the survey) """
- context = context if context else {}
+ context = dict(context or {})
applicant = self.browse(cr, uid, ids, context=context)[0]
survey_obj = self.pool.get('survey.survey')
response_obj = self.pool.get('survey.user_input')
@@ -397,8 +397,7 @@ class hr_applicant(osv.Model):
return super(hr_applicant, self).message_new(cr, uid, msg, custom_values=defaults, context=context)
def create(self, cr, uid, vals, context=None):
- if context is None:
- context = {}
+ context = dict(context or {})
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')
@@ -500,13 +499,14 @@ class hr_applicant(osv.Model):
raise osv.except_osv(_('Warning!'), _('You must define an Applied Job and a Contact Name for this applicant.'))
action_model, action_id = model_data.get_object_reference(cr, uid, 'hr', 'open_view_employee_list')
- dict_act_window = act_window.read(cr, uid, action_id, [])
+ dict_act_window = act_window.read(cr, uid, [action_id], [])[0]
if emp_id:
dict_act_window['res_id'] = emp_id
dict_act_window['view_mode'] = 'form,tree'
return dict_act_window
def get_empty_list_help(self, cr, uid, help, context=None):
+ context = dict(context or {})
context['empty_list_help_model'] = 'hr.job'
context['empty_list_help_id'] = context.get('default_job_id', None)
context['empty_list_help_document_name'] = _("job applicants")
diff --git a/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py b/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py
index d2e778c38a4..752b65845d7 100644
--- a/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py
+++ b/addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py
@@ -46,7 +46,7 @@ class hr_recruitment_partner_create(osv.osv_memory):
if context is None:
context = {}
- data = self.read(cr, uid, ids, [], context=context)[0]
+ data = self.read(cr, uid, ids, context=context)[0]
result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
res = mod_obj.read(cr, uid, result, ['res_id'], context=context)
@@ -76,7 +76,7 @@ class hr_recruitment_partner_create(osv.osv_memory):
'view_id': False,
'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
- }
+ }
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: