跳至內容
選單
此問題已被標幟
2730 瀏覽次數

I tried but no success:

class PartnerNote(models.Model):
_inherit = 'res.partner'

@api.returns('mail.message', lambda value: value.id)
def message_post(self, body='', subject=None, message_type='notification', subtype_id=None, parent_id=False, attachments=None, **kwargs):
msg = super(PartnerNote, self).message_post(body='Partner: ' + body, subject=subject, message_type=message_type, subtype_id=subtype_id, parent_id=parent_id, attachments=attachments, **kwargs)
if self.id:
msg.copy(default={'res_id': 5, 'model': 'crm.lead'})
return msg

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
6月 21
3401
0
6月 21
2230
0
4月 24
2577
3
9月 25
20059
2
8月 16
5619