Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
7169 มุมมอง
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can use server action + hr.holiday workflow for this requirement. It is better than automated action. And i'm not at all confident in automated action for this requirement(leave request,approval...).  

For this you want to create two server action. Setting->Technical->Actions->Server Actions. Create a new server action for leave request to manager Action name:leave_request_manager.

Object:Leave

Action type:Email

Condition:True

Email Address: object.employee_id.parent_id.work_email

Subject: Leave Request from [[ object.employee_id.name ]]

Message: Dear [[object.employee_id.parent_id.name]],

You have one Leave Request from [[ object.employee_id.name ]]. Kindly click the link below to validate the application form. Web: localhost:8069 or ipaddress:8069

Thank you.

Create a new server action for approve mail from manager.

Action name:leave_approval_manager.

Object:Leave

Action type:Email

Condition:True

Email Address: object.employee_id.work_email

Subject: Leave Approval of [[object.employee_id.name]]

Message: Dear [[object.employee_id.name]]

[[object.number_of_days_temp]] day(s) leave from '[[object.date_from]]' to '[[object.date_to]]' has been approved.

Thank You.

Action name:leave_refusal_manager.

Object:Leave

Action type:Email

Condition:True

Email Address: object.employee_id.work_email

Subject: Leave Refusal of [[object.employee_id.name]]

Message: Dear [[object.employee_id.name]]

[[object.number_of_days_temp]] day(s) leave from '[[object.date_from]]' to '[[object.date_to]]' has been refused.

Thank You.

Next step is you want to call these server actions from workflow.

Setting->Technical->Workflow->Workflow->hr.wkf.holidays

confirm->server action->leave_request_manager

validate->server action->leave_approval_manager

refuse->server action->leave_refusal_manager(Kind:Dummy in Workflow)

Thus you can configure it

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Guys,

Please see http://www.serpentcs.com/wp-content/uploads/2014/08/Automated-action-Rule-for-Project-Issue.pdf if this helps!

Thanks.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

 I am getting error  asking sender email and then email is only recieved as notification not in outlook 

อวตาร
ละทิ้ง

can you paste the error

Error is send email required

Dear remya the code which you gave me is correct? the column should be { or [ please reply