Turkesh Patel (openERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-897580-tpa into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #897580 in OpenERP Addons: "when click on cancel and reopen the apprisal
it makes duplicate of apprisal surveys."
https://bugs.launchpad.net/openobject-addons/+bug/897580
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-897580-tpa/+merge/83745
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-897580-tpa/+merge/83745
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-897580-tpa.
=== modified file 'hr_evaluation/hr_evaluation.py'
--- hr_evaluation/hr_evaluation.py 2011-11-11 20:29:46 +0000
+++ hr_evaluation/hr_evaluation.py 2011-11-29 09:59:25 +0000
@@ -250,13 +250,12 @@
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')}
=== modified file 'hr_evaluation/hr_evaluation_view.xml'
--- hr_evaluation/hr_evaluation_view.xml 2011-11-24 12:14:33 +0000
+++ hr_evaluation/hr_evaluation_view.xml 2011-11-29 09:59:25 +0000
@@ -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>
_______________________________________________
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