Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
12325 Visualizzazioni
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
Abbandona
Risposta migliore
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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
4
dic 24
30789
2
giu 19
2806
2
mar 15
9563
1
dic 24
1529
1
nov 24
2004