Skip to Content
मेन्यू
This question has been flagged

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

Avatar
Discard
Related Posts Replies Views Activity
0
जून 21
3329
0
जून 21
2216
0
अप्रैल 24
2523
3
जन॰ 25
19835
2
अग॰ 16
5549