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

Hi,

I have configured an Automated Action with the model "hr.contract", and in the Server Actions i created one where the action to execute is "Send Email" and i created a Email Template with variables using ${object.XXXXX} where XXXXX depends of the field that i want to show, in the Server Action i created a button that appears in the "More" menu of the model "hr.contract", when i execute this new button, the Email was sent perfectly, but when the Server Action is triggered by the Automated Action the Email was sent but the variables are not replaced with the values of the object.

I changed the Server Action where the action to do is "Execute Python Code", and in the box "Python Code" i put this:

active_id = context.get('active_id')
self.pool.get('email.template').send_mail(cr, uid, 16, 1, False, context=context)

Where 16 is the ID of the "Email Template" and 1 is the ID of one contract, then i execute again the Server Actions with the button of the "More" options in the "hr.contract" model and the Email was sent perfectly, but when is executed by the Automated Action the Email was sent without the variables changed.

¿Any idea in what i need to do?

Best regards,

Juan David López

아바타
취소
관련 게시물 답글 화면 활동
3
4월 24
2056
2
1월 24
4256
2
1월 24
9931
1
9월 23
1936
0
10월 24
6564