Skip to content

Commit

Permalink
Ao criar match, enviar notificação mobile para o usuário popsolutions#14
Browse files Browse the repository at this point in the history
  • Loading branch information
MateusONunes committed Oct 17, 2021
1 parent ec78d18 commit bf27418
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bailaki/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,17 @@ def _compute_match_relation(self):
[['channel_id', '=', mail_channel.id]]);
mail_channel_partner.write({'is_pinned': True});

#Criar notificação mobile

mobileNitification = [{
'author_id': rec.id,
'res_id': mail_channel.id,
'subject': 'Novo Parceiro',
'body': rec.name + ' também quer dançar com você'}
]

self.env['mail.message'].sendModileNotification(mobileNitification, 0)

@api.multi
def _compute_referred_friend_ids(self):
for rec in self:
Expand Down

0 comments on commit bf27418

Please sign in to comment.