Rajesh Prajapati (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-addons_23-mdi-hr-rpr into 
lp:~openerp-dev/openobject-addons/trunk-addons_23-mdi.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons_23-mdi-hr-rpr/+merge/135129


Hello 

       Create method for button Start Interview in hr_recruitment.

Thanks,
Rajesh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons_23-mdi-hr-rpr/+merge/135129
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openobject-addons/trunk-addons_23-mdi-hr-rpr into 
lp:~openerp-dev/openobject-addons/trunk-addons_23-mdi.
=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py	2012-11-19 14:42:36 +0000
+++ hr_recruitment/hr_recruitment.py	2012-11-20 11:59:42 +0000
@@ -312,6 +312,22 @@
         }
         return res
 
+    def action_fill_survey(self, cr, uid, ids, context=None):
+        if context is None:
+            context = {}
+        record = self.browse(cr, uid, ids, context=context)
+        record = record and record[0]
+        sur_obj = self.pool.get("survey").read(cr, uid, ids, context=context)
+        context.update({'survey_id': record.survey.id, 'response_id': [record.response], 'response_no': 0})
+        return {
+            'view_type': 'form',
+            'view_mode': 'form',
+            'res_model': 'survey.question.wiz',
+            'type': 'ir.actions.act_window',
+            'target': 'new',
+            'context': context
+        }
+
     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).

=== modified file 'hr_recruitment/hr_recruitment_view.xml'
--- hr_recruitment/hr_recruitment_view.xml	2012-11-15 12:38:51 +0000
+++ hr_recruitment/hr_recruitment_view.xml	2012-11-20 11:59:42 +0000
@@ -116,9 +116,8 @@
                 <div class="oe_right oe_button_box">
                     <button name="action_makeMeeting" type="object"
                         string="Schedule Meeting" help="Schedule interview with this applicant"/>
-                    <button name="%(survey.action_view_survey_question_message)d" type="action"
+                    <button name="action_fill_survey" type="object"
                         string="Start Interview" help="Answer related job question"
-                        context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant'}"
                         attrs="{'invisible':[('survey','=',False)]}"/>
                     <button name="action_print_survey" type="object"
                         string="Print Interview" help="Print interview report"

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to