コンテンツへスキップ
メニュー
この質問にフラグが付けられました

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
2097
2
1月 24
4272
2
1月 24
9957
1
9月 23
1964
0
10月 24
6622