Odoo Help

0

1
1 回答
0
Wided チュニジア
2019/04/03 6:44

Here's what I did for those who want to do the same thing:

class MailActivity(models.Model):

_inherit = ['mail.thread','mail.activity']
_name='mail.activity'

@api.model
def create(self, values):
rec = super(MailActivity, self).create(values)
model= self.env[rec.res_model].search([('id','=',rec.res_id)])
followers=model.message_partner_ids
follower_ids=(tuple(followers.ids))
rec.message_post(subject='New activity',type='email',partner_ids=follower_ids)
return rec
質問する
Writer
Keep Informed
1 フォロワー
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now