hr_payslip_workflow.xml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <openerp>
  3. <data>
  4. <record id="act_paid" model="workflow.activity">
  5. <field name="wkf_id" ref="hr_payroll.wkf"/>
  6. <field name="name">paid</field>
  7. <field name="action">write({'state': 'paid'})</field>
  8. <field name="kind">function</field>
  9. <field name="signal_send">subflow.paid</field>
  10. </record>
  11. <record model="workflow.activity" id="act_open_test">
  12. <field name="wkf_id" ref="hr_payroll.wkf"/>
  13. <field name="name">re-open</field>
  14. <field name="action">write({'state':'done'})</field>
  15. <field name="kind">function</field>
  16. </record>
  17. <record id="workflow_transition_act_done_to_act_paid" model="workflow.transition">
  18. <field name="act_from" ref="hr_payroll.act_done"/>
  19. <field name="act_to" ref="act_paid"/>
  20. <field name="trigger_model">account.move.line</field>
  21. <field name="trigger_expr_id">move_line_id_payment_get()</field>
  22. <field name="condition">reconciled</field>
  23. </record>
  24. <record id="workflow_transition_act_paid_to_act_copen_test" model="workflow.transition">
  25. <field name="act_from" ref="act_paid"/>
  26. <field name="act_to" ref="act_open_test"/>
  27. <field name="signal"/>
  28. <field name="condition">not reconciled</field>
  29. </record>
  30. <record id="workflow_transition_open_test_to_paid" model="workflow.transition">
  31. <field name="act_from" ref="act_open_test"/>
  32. <field name="act_to" ref="act_paid"/>
  33. <field name="trigger_model">account.move.line</field>
  34. <field name="trigger_expr_id">move_line_id_payment_get()</field>
  35. <field name="condition">reconciled</field>
  36. </record>
  37. <record id="workflow_transition_act_paid_to_act_cancel" model="workflow.transition">
  38. <field name="signal">cancel_sheet</field>
  39. <field name="act_from" ref="act_open_test"/>
  40. <field name="act_to" ref="hr_payroll.act_cancel"/>
  41. <field name="condition">True</field>
  42. </record>
  43. </data>
  44. </openerp>