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

Hi all

Please help me
How can I add the customer name after hello

I am using Odoo 15 enterprise.


아바타
취소
베스트 답변

You can do that by inheriting mail.wizard.invite TransientModel and then add onchange method for partner_ids fields, loop the  partner_ids and then get the names of the partners and add them to the message field.

The below is working if you invite only one follower but if you want o add all partners you need to get the message as xml and then replace the first p tag:

from odoo import api, fields, models, _

class Invite(models.TransientModel):
_inherit = 'mail.wizard.invite'

@api.onchange('partner_ids')
def _changepartner(self):
msg = "Hello "
if self.partner_ids:
for partner in self.partner_ids:
msg = msg + partner.name + ","
self.message = self.message.replace("Hello,", msg)


아바타
취소
작성자

Hi CorTex IT Solutions Ltd
Thank you
If I use Odoo enterprise, how will it be adjusted?

관련 게시물 답글 화면 활동
1
3월 15
3242
Disable Followers 해결 완료
1
7월 24
5739
0
12월 21
2269
1
2월 24
4548
0
2월 20
2860