[FIX] solved problem of duplication in apprisal survey in hr_evaluation module

bzr revid: tpa@tinyerp.com-20111129095234-p0d7u8ihfhp706k2
This commit is contained in:
Turkesh Patel (Open ERP) 2011-11-29 15:22:34 +05:30
parent aaec013f9e
commit 663030a591
2 changed files with 3 additions and 6 deletions

View File

@ -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')}

View File

@ -207,8 +207,6 @@
icon="gtk-execute"/>
<button name="button_done" string="Done" states="progress" type="object"
icon="gtk-jump-to"/>
<button name="button_draft" string="Reset to Draft" states="cancel" type="object"
icon="terp-stock_effects-object-colorize"/>
<button name="button_final_validation" string="Validate Appraisal" states="wait" type="object"
icon="gtk-go-forward"/>
</group>