콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
7 답글
18264 화면

Hi,

I need to send an email to the manager of the employee whenever an employees applies a leave and also need to send an email to the user when manager approves or reject the leave application.

아바타
취소
베스트 답변

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

아바타
취소

Thanks, it works and was very usefull to me

This is really useful! Especially on how to embed the fields from the data!

This really helped me a lot, but I have a question - posted here --> http://help.openerp.com/question/42224/how-to-set-more-than-one-email-in-server-action/

베스트 답변

I ma unable to send mail... :( Can u help me plzzzz.....

i am getting error as

Mail delivery failed

Mail delivery failed via SMTP server 'smtpout.asia.secureserver.net'. SMTPSenderRefused: 550 <name@name> size=540 invalid address name@name

아바타
취소

please specify your overall configuration

베스트 답변

Even I have the same problem of sending email notifications of leave management. Kindly, please do assist me with the same in Odoo 10 because what's above is completely different from the ones that Odoo 10 is having right now. Thanks in Advance!

아바타
취소
관련 게시물 답글 화면 활동
0
3월 15
4173
1
3월 15
7706
1
7월 25
1439
5
5월 25
19043
0
4월 25
1491