[FIX] hr_payroll: set to draft button not working in cancel state
bzr revid: ara@tinyerp.com-20110408093829-b62t39d3heuk3mnh
This commit is contained in:
parent
7ff22495b9
commit
0b00184c32
|
@ -276,9 +276,6 @@ class hr_payslip(osv.osv):
|
|||
}
|
||||
return super(hr_payslip, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def set_to_draft(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
|
||||
|
||||
def cancel_sheet(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
<button string="Verify Sheet" icon="terp-camera_test" name="verify_sheet" states="draft"/>
|
||||
<button string="Approve Sheet" icon="terp-camera_test" name="final_verify_sheet" states="hr_check"/>
|
||||
<button string="Pay Salary" icon="terp-dolar_ok!" name="process_sheet" states="confirm"/>
|
||||
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="set_to_draft" states="cancel"/>
|
||||
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="draft" states="cancel"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -11,8 +11,10 @@
|
|||
<field name="wkf_id" ref="wkf"/>
|
||||
<field name="name">draft</field>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">write({'state': 'draft'})</field>
|
||||
<field name="split_mode">OR</field>
|
||||
<field name="kind">dummy</field>
|
||||
|
||||
</record>
|
||||
|
||||
<record id="act_hr_check" model="workflow.activity">
|
||||
|
@ -89,7 +91,7 @@
|
|||
<record id="t12" model="workflow.transition">
|
||||
<field name="act_from" ref="act_cancel"/>
|
||||
<field name="act_to" ref="act_draft"/>
|
||||
<field name="signal">set_to_draft</field>
|
||||
<field name="signal">draft</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue