跳至内容
菜单
此问题已终结
2 回复
3566 查看

where can i find information about models in odoo.
like there are a model called "Email Threads" and i don't know what this model do.

形象
丢弃
最佳答案

mail_thread model is meant to be inherited by any model that needs to act as a discussion topic on which messages can be attached. Public methods are prefixed with ``message_`` in order to avoid name

collisions with methods of the models that will inherit from this class.

``mail.thread`` defines fields used to handle and display the communication history.

``mail.thread`` also manages followers of inheriting classes. All features and expected behavior are managed by mail.thread. Widgets has been designed for the 7.0 and following versions of Odoo.

Inheriting classes are not required to implement any method, as the default implementation will work for any model. However it is common to override at least the ``message_new`` and ``message_update`` methods (calling ``super``) to add model-specific behavior at

creation and update of a thread when processing incoming emails.

You can find the description here:

https://github.com/odoo/odoo/blob/15.0/addons/mail/models/mail_thread.py#L36 

Please read the documentation about how to user mail.thread model:

https://www.odoo.com/documentation/15.0/developer/reference/addons/mixins.html?highlight=thread#messaging-features




形象
丢弃
最佳答案

You can check in the comments in the source 

形象
丢弃