Hi there, I want to post a message to all followers of a customer if someone modify or edit the details (click the save button). This is intended to be informed about changes.
Is this possible? I didn't find any information about how to do that.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi there, I want to post a message to all followers of a customer if someone modify or edit the details (click the save button). This is intended to be informed about changes.
Is this possible? I didn't find any information about how to do that.
You have to create a new module that overrides the write() method of the res.partner object. In this method, you can then post the details of the change. A very simple example:
def write(cr, uid, ids, vals, context=None):
res = super(res_partner, self).write(cr, uid, ids, vals, context=context)
self.message_post(cr, uid, ids,
body="has been <b>updated</b>.",
subject="Record Updated",
context=context)
return res