← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 784197] Re: hr recruitment does not open the related survey on the "Answer" button

 

** Attachment added: "hr_job.ogv"
   https://bugs.launchpad.net/openobject-addons/+bug/784197/+attachment/2133453/+files/hr_job.ogv

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/784197

Title:
  hr recruitment does not open the related survey on the "Answer" button

Status in OpenERP Modules (addons):
  New

Bug description:
  hi,

  I've create an hr.job position with a related survey, the survey is in open state.
  then I've created an hr.applicant record, saved it, and then clicked the "Answer" button.
  Unfortunately, the attached survey does not show up.

  I've tried to find out the reason, here are my investigations.

  the answer button is defined as follows:
  addon: hr_recruitment 
  view: crm_case_form_view_job
  field: survey.action_view_survey_question_message
  sets context: {'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant', 'cur_id' :active_id}

  calls the survey.wizards.survey_answer model

  survey_answer.fields_view_get is called with the following arguments

  first call:
  self = <survey.wizard.survey_answer.survey_question_wiz object at 0xad450ac>
  cr = <sql_db.Cursor object at 0xb45b20c>
  uid = 1
  view_id = 755
  view_type = search
  context = {'lang': u'hu_HU', 'search_default_department_id': False, 'tz': u'Europe/Budapest', 'search_view': 805, 'active_model': 'ir.ui.menu', 'department_id': False, 'section_id': False, '_terp_view_name': u'P\xe1ly\xe1z\xf3k', 'search_default_user_id': 1, 'client': 'web', 'search_default_current': 1, 'active_ids': [2], 'active_id': 2}
  toolbar = False
  submenu = False

  and second call:
  self = <survey.wizard.survey_answer.survey_question_wiz object at 0xad450ac>
  cr = <sql_db.Cursor object at 0xb3e902c>
  uid = 1
  view_id = False
  view_type = form
  context = {'lang': u'hu_HU', 'search_default_department_id': False, 'tz': u'Europe/Budapest', 'search_view': 805, 'active_model': 'hr.applicant', 'department_id': False, 'section_id': False, '_terp_view_name': u'Survey Question', 'search_default_user_id': 1, 'client': 'web', 'search_default_current': 1, 'active_ids': [2], 'active_id': 2}
  toolbar = True
  submenu = True

  finally the default view of a simple 'name' field is returned without
  any survey data at all. This simple view is defined for survey_answer,
  and I guess this should be overwritten in the fields_view_get method

  I've checked and my browse_record for hr.applicant correctly returns
  the related survey under my_applicant_record.survey attribute.

  thanks for any help


References