Odoo Chatter Message Posting Guide
Keeping a track of all the important changes or developments of a process can be extremely helpful in the long run of an organization. ‘Chatter’ is one of Odoo’s communication tools that can be used for this purpose and for real-time communication.
Odoo is present by default in modules like Sales, Purchase, Inventory, Accounting, and so forth we can also add This to our custom modules.
Chatter in Odoo
Odoo Chatter also helps in facilitating internal communications within the organization. For example, when a Sale Quotation is confirmed and gets converted to a Sale Order, a message ‘’Status: Quotation → Sale Order’ will appear in the chatter. The administrator or the user can thus keep track of confirmation and its state.
We can post custom messages in the chatter. To achieve this, we can use Odoo’s default function named ‘message_post’. I used this function for posting messages in the chatter and for sending emails.
There are different arguments that can be used with the ‘message_post’ function. These include –
- body
- subtype
- subject
- attachment_ids
- message_type
- partner_ids
- author_id
- email_from and so forth
Let us see an example where we can post messages in the chatter by using the argument ‘body’.
Consider a ‘Sale Quotation’ being confirmed to a ‘Sale Order’ and a corresponding ‘Delivery Order’ being created. Here, we will post a message in the chatter if a product’s done quantity from the delivery order is zero.
The image below shows the Sale Quotation/Sale Order.
The image below shows the corresponding Delivery Order.
In order to post a message in the chatter Odoo in case of zero product quantity, the following code can be used.
In this code, the message to be displayed (i.e. ‘display_msg’) in the chatter is being passed in the argument ‘body’ of the ‘message_post’ function.
In this example, while validating the ‘Delivery Order’ with zero ‘Done’ quantity of product ‘Office Lamp’, the above message will be posted in the chatter of the corresponding ‘Sale Order’.
In this way, we can add custom messages, attachments, and so forth to the chatter by using the ‘message_post’ function.
"Unlock the Full Potential of Your Business with Odoo ERP!"
"Get a Cost Estimate for Your ERP Project, Absolutely FREE!"
Get a Free Quote
I am extremely impressed with your writing skills as well as with the layout on your blog. Is this a paid theme or did you modify it yourself? Anyway keep up the excellent quality writing, it is rare to see a nice blog like this one nowadays..