diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py
index e1d451c9f7f..54a15d5593c 100644
--- a/addons/hr_evaluation/hr_evaluation.py
+++ b/addons/hr_evaluation/hr_evaluation.py
@@ -250,13 +250,12 @@ class hr_evaluation(osv.osv):
return True
def button_cancel(self, cr, uid, ids, context=None):
+ interview_obj=self.pool.get('hr.evaluation.interview')
+ evaluation = self.browse(cr, uid, ids[0], context)
+ interview_obj.survey_req_cancel(cr, uid, [r.id for r in evaluation.survey_request_ids])
self.write(cr, uid, ids,{'state':'cancel'}, context=context)
return True
- def button_draft(self, cr, uid, ids, context=None):
- self.write(cr, uid, ids,{'state': 'draft'}, context=context)
- return True
-
def write(self, cr, uid, ids, vals, context=None):
if 'date' in vals:
new_vals = {'date_deadline': vals.get('date')}
diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml
index d8dfa7e40ca..4bf3ba0fff7 100644
--- a/addons/hr_evaluation/hr_evaluation_view.xml
+++ b/addons/hr_evaluation/hr_evaluation_view.xml
@@ -207,8 +207,6 @@
icon="gtk-execute"/>
-