This question has been flagged
2 Replies
9699 Views
I would like to understand how the chatter records are generated and how they 
are related to the "owning" record.

What PostgreSQL tables & fields  are involved?
Avatar
Discard
Best Answer
Chatter is stored in the mail.message model which is persisted in the mail_message table in PostgreSQL.


When I add a chatter message to a Sales Order (id=7) like this:




The following mail.message record is created:



The fields that related it back to the "owning" record are Related Document Model (the model field) and Related Document ID (the res_id field).

WARNING:

You can EASILY end up corrupting your database by getting your data into an inconsistent state when you have an incomplete understanding of the schema and do not update the data tables and/or fields and/or related tables in a way that is consistent with the way the Odoo ORM manages data. 

We do not recommend using SQL DML (CREATE, INSERT, UPDATE, DELETE) statements with Odoo databases because this bypasses the business logic defined in the Python models - there will be no "validation" that your change is consistent, valid and is supported by the logical behavior of each model record (in addition, not all fields are persisted in PostgreSQL). 

We recommend using only SQL DQL (SELECT) statements with Odoo databases.

Odoo can only provide VERY LIMITED support to Users who elect to ignore these recommendations.
Avatar
Discard
Best Answer

Hello Ray, I'd like to know how can I access the mail.message records, like the one you just created on the sale order, how can I see the list of records?


Thank you.



Avatar
Discard