Hardik Ansodariya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-hr_periodic_evaluation-han into 
lp:openobject-addons.

Requested reviews:
  Amit Patel (Open ERP) (apa-tiny)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-hr_periodic_evaluation-han/+merge/87331

Has hr.evaluation.interview is an inherits for survey this should also work:

evaluation plan form view : sequence of appraisal : in the evaluation phase, 
you have to specify a the sequence and the "wait for previous phase". This 
field does not seem working. if this field = true, the record should appears in 
the evaluation form only once previous phase is done.

example, there are 4 phases in the evaluation plan
sequence 1 | tp down | wait for previous phase = false
sequence 1 | bottom up | wait for previous phase = false
sequence 1 | self appraisal |wait for previous phase = false
sequence 2 | final interview | wait for previous phase = TRUE

That means that i have to see in evaluation of my employee :
sequence 1 | tp down | wait for previous phase = false
sequence 1 | bottom up | wait for previous phase = false
sequence 1 | self appraisal |wait for previous phase = false
-> the third one mus be available only once the 3 firsts are done
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-hr_periodic_evaluation-han/+merge/87331
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-hr_periodic_evaluation-han.
=== modified file 'hr_evaluation/hr_evaluation.py'
--- hr_evaluation/hr_evaluation.py	2011-12-05 13:21:02 +0000
+++ hr_evaluation/hr_evaluation.py	2012-01-03 11:18:31 +0000
@@ -224,6 +224,8 @@
                         wait = True
                     if not wait:
                         hr_eval_inter_obj.survey_req_waiting_answer(cr, uid, [int_id], context=context)
+                    elif wait:
+                        hr_eval_inter_obj.survey_req_draft_answer(cr, uid, [int_id], context=context)
 
                     if (not wait) and phase.mail_feature:
                         body = phase.mail_body % {'employee_name': child.name, 'user_signature': child.user_id.signature,
@@ -309,6 +311,10 @@
     def survey_req_waiting_answer(self, cr, uid, ids, context=None):
         self.write(cr, uid, ids, { 'state': 'waiting_answer'}, context=context)
         return True
+    
+    def survey_req_draft_answer(self, cr, uid, ids, context=None):
+        self.write(cr, uid, ids, { 'state': 'draft'}, context=context)
+        return True
 
     def survey_req_done(self, cr, uid, ids, context=None):
         hr_eval_obj = self.pool.get('hr_evaluation.evaluation')

=== modified file 'survey/wizard/survey_answer.py'
--- survey/wizard/survey_answer.py	2011-12-26 12:57:47 +0000
+++ survey/wizard/survey_answer.py	2012-01-03 11:18:31 +0000
@@ -56,6 +56,7 @@
         que_col_head = self.pool.get('survey.question.column.heading')
         user_obj = self.pool.get('res.users')
         mail_message = self.pool.get('mail.message')
+        obj_module = self.pool.get('ir.module.module')
         
         if view_type in ['form']:
             wiz_id = 0
@@ -394,6 +395,11 @@
                         survey_data = survey_obj.browse(cr, uid, survey_id)
                         response_id = surv_name_wiz.read(cr, uid, context.get('sur_name_id',False))['response']
                         context.update({'response_id':response_id})
+                        module_id = obj_module.search(cr, uid, [('name', '=', 'hr_evaluation')])
+                        state = obj_module.browse(cr, uid, module_id, context=context)[0].state
+                        if state == 'installed':
+                            interview_id = context.get('active_ids',False)
+                            eval_inter_obj = self.pool.get('hr.evaluation.interview').survey_req_done(cr, uid, interview_id, context=context)
                         report = self.create_report(cr, uid, [survey_id], 'report.survey.browse.response', survey_data.title,context)
                         attachments = {}
                         file = open(addons.get_module_resource('survey', 'report') + survey_data.title + ".pdf")

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to