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

Hello Community,

I want to send survey email with partner name for this i have override survey email template but its module is survey_survey. So how can i send email to partner with his name

Thanks in advance.



Survey - Send by Email



Hello ${name of partner},


We are conducting a survey, and your response would be appreciated.


Please, click here to start survey


Thanks for your participation!


]]>




                
อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

problem solved. 

{'body_html': wizard.body.replace("__URL__", url).replace("partner_name", partner_name.name)}

Thanks

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

Hi,

In higher versions like odoo14, it seems available by default. In odoo11, you can the get the partner name as follows: 

Dear ${object.partner_id.name or 'participant'}


Thanks

อวตาร
ละทิ้ง
ผู้เขียน

Hi Niyas, Thanks for your reply. i am already tried this and getting "UndefinedError: 'odoo.api.survey.survey object' has no attribute 'partner_id'" due to unavailability partner in survey model.

if so, can you check how it is implemented in the latest versions

ผู้เขียน

problem solved.

{'body_html': wizard.body.replace("__URL__", url).replace("partner_name", partner_name.name)}

Thanks

คำตอบที่ดีที่สุด

Hi Pawan,

    Instead of overriding create a new email template with model _id as "model_survey_user_input".

In the new template add these in the body

Hello ${object.partner_id.name or 'participant'},
We are conducting a survey, and your response would be appreciated.
Please, click here to start survey( add this in the href "${(object.action_survey_resend()) | safe}"

Thanks for your participation!

Hope this helps

Regards

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ย. 21
2081
0
ธ.ค. 21
2680
Hide menu for all except specific group แก้ไขแล้ว
1
พ.ย. 22
3381
Live tracking in odoo. แก้ไขแล้ว
2
ส.ค. 22
7718
1
ม.ค. 25
9397