Hi all
Please help me
How can I add the customer name after hello
I am using Odoo 15 enterprise.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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?
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 3 15
|
3126 | ||
Disable Followers
Đã xử lý
|
|
1
thg 7 24
|
3996 | |
|
0
thg 12 21
|
2179 | ||
|
1
thg 2 24
|
4451 | ||
|
0
thg 2 20
|
2745 |