Is it possible to change the sender address for all emails sent via chatter of a certain model? If so, how can I do it?
لقد تم الإبلاغ عن هذا السؤال
1
الرد
4675
أدوات العرض
Fixed:
class TheModel(models.Model):
...
_inherit = ['mail.thread', 'mail.activity.mixin']
...
@api.multi
@api.returns('self', lambda value: value.id)
def message_post(self, body='', subject=None, message_type='notification', **kwargs):
kwargs['email_from'] = "REALMAIL <realmail@domain.com>"
return super(TheModel, self).message_post(body, subject, message_type, **kwargs)
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل| المنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
|---|---|---|---|---|
|
|
3
يوليو 21
|
11518 | ||
|
|
0
أبريل 21
|
3487 | ||
|
|
1
يونيو 19
|
5795 | ||
|
|
1
أغسطس 25
|
5391 | ||
|
|
1
مارس 25
|
3427 |