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

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

아바타
취소
관련 게시물 답글 화면 활동
0
9월 21
2136
0
12월 21
2749
1
11월 22
3503
2
8월 22
7904
1
1월 25
9580