[FIX] hr_evaluation: add draft button on evaluation form when it got canceled
lp bug: https://launchpad.net/bugs/720221 fixed bzr revid: mra@mra-laptop-20110217052605-v6ni6uqw50xkguh9
This commit is contained in:
parent
f60f00afaf
commit
8ffac40122
|
@ -251,6 +251,10 @@ class hr_evaluation(osv.osv):
|
|||
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')}
|
||||
|
|
|
@ -200,16 +200,18 @@
|
|||
</page>
|
||||
</notebook>
|
||||
<newline/>
|
||||
<group col="6" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,wait,progress" type="object"
|
||||
icon="gtk-cancel"/>
|
||||
<button name="button_plan_in_progress" string="Start Evaluation" states="draft" type="object"
|
||||
icon="gtk-execute"/>
|
||||
<button name="button_done" string="Done" states="progress" type="object"
|
||||
icon="gtk-jump-to"/>
|
||||
<button name="button_final_validation" string="Validate Evaluation" states="wait" type="object"
|
||||
icon="gtk-go-forward"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft,wait,progress" type="object"
|
||||
icon="gtk-cancel"/>
|
||||
<button name="button_plan_in_progress" string="Start Evaluation" states="draft" type="object"
|
||||
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 Evaluation" states="wait" type="object"
|
||||
icon="gtk-go-forward"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -250,12 +252,12 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Search Evaluation">
|
||||
<group col='10' colspan='4'>
|
||||
<filter icon="terp-check" string="Current" domain="[('state','=','wait'))]" help="Evaluations that are in waiting state"/>
|
||||
<filter icon="terp-check" string="Current" domain="[('state','=','wait'))]" help="Evaluations that are in waiting state"/>
|
||||
<filter icon="terp-camera_test" string="In progress" domain="[('state','=','progress')]" help="Evaluations that are in progress state"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-week" string="7 Days" help="Evaluations to close within the next 7 days"
|
||||
domain="[('date', '>=', (datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" />
|
||||
<separator orientation="vertical"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
|
||||
help="Evaluations that overpassed the deadline" domain="[('date','<=',(datetime.date.today()).strftime('%%Y-%%m-%%d'))]" />
|
||||
<separator orientation="vertical"/>
|
||||
|
@ -405,11 +407,11 @@
|
|||
action="action_hr_evaluation_send_mail" sequence="45" groups="base.group_hr_manager"/>
|
||||
|
||||
<!-- Evaluation Interviews Button on Employee Form -->
|
||||
<act_window
|
||||
<act_window
|
||||
context="{'search_default_user_to_review_id': [active_id]}"
|
||||
id="act_hr_employee_2_hr__evaluation_interview"
|
||||
name="Evaluation Interviews"
|
||||
res_model="hr.evaluation.interview"
|
||||
id="act_hr_employee_2_hr__evaluation_interview"
|
||||
name="Evaluation Interviews"
|
||||
res_model="hr.evaluation.interview"
|
||||
src_model="hr.employee"/>
|
||||
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue