Odoo Help

Welcome!

This community 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.

1

How to post a message in the messages and communication history

By
Philip
on 2/26/13, 3:51 AM 6,033 views

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.

4
Mike Telahun
On 3/19/13, 7:40 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 2/26/13, 3:51 AM
Seen: 6033 times
Last updated: 1/19/16, 3:49 AM