Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1710 Widoki

Hello, I have a client who wants to manipulate the Channels, so what he wants is, when there is a lead, instead of sending it to a notification, He wants the it to redirect channels to message him, and tell him that there is a new lead. 



Like for example, This lead will be in the channel or 






or 


Is that possible to achieve? 

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

You can create a custom module to achieve this.
What you need to do is inherit the crm.lead model and in its create function, update the code to add the details to the channel that you want.
Please refer the below code below to get an idea:

_inhert = 'crm.lead'


@api.model

def create(self, vals):

​ res = super().create(vals)

​ message = (" name %s ') % res.name

​ required_channel = self.env['mail.channel'].search([], limit=1)

​ required_channel.message_post(

​ body=message,

​message_type='comment',

​subtype_xmlid='mail.mt_comment',)

​ return res


Hope it helps


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
sie 23
3216
1
lip 23
2578
1
lip 23
7551
1
lip 18
11823
1
cze 17
5981