From 4dce4ec1674818c67c6ec73ef5503d3da9fc636e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 2 Dec 2025 14:38:58 +0100 Subject: [PATCH] Add documentation for chat --- trytond/doc/modules/ir/design/chat.inc.rst | 25 ++++++++++++++++++++++ trytond/doc/modules/ir/design/index.rst | 1 + trytond/doc/ref/models.rst | 9 ++++++++ 3 files changed, 35 insertions(+) create mode 100644 trytond/doc/modules/ir/design/chat.inc.rst diff --git a/trytond/doc/modules/ir/design/chat.inc.rst b/trytond/doc/modules/ir/design/chat.inc.rst new file mode 100644 index 0000000000..8610af89e6 --- /dev/null +++ b/trytond/doc/modules/ir/design/chat.inc.rst @@ -0,0 +1,25 @@ +.. _model-ir.chat.channel: + +Chat Channel +============ + +A *Channel* stores the `model-ir.chat.message` linked to a +:class:`~trytond.model.ChatMixin`. + + +.. _model-ir.chat.follower: + +Chat Follower +============= + +The *Follower* concept stores the `model-res.user` or *email* to +notify for new message on the linked `model-ir.chat.channel`. + + +.. _model-ir.chat.message: + +Chat Message +============ + +A *Message* stores the content posted to a `model-ir.chat.channel`. +The audience property defines who can see the message. diff --git a/trytond/doc/modules/ir/design/index.rst b/trytond/doc/modules/ir/design/index.rst index 2fa0de69d3..6b8e8a9569 100644 --- a/trytond/doc/modules/ir/design/index.rst +++ b/trytond/doc/modules/ir/design/index.rst @@ -25,6 +25,7 @@ The *Internal Resource Module* introduces the following concepts: .. include:: lang.inc.rst .. include:: message.inc.rst .. include:: note.inc.rst +.. include:: chat.inc.rst .. include:: queue.inc.rst .. include:: rule.inc.rst .. include:: sequence.inc.rst diff --git a/trytond/doc/ref/models.rst b/trytond/doc/ref/models.rst index 19a9a6d527..03dd798186 100644 --- a/trytond/doc/ref/models.rst +++ b/trytond/doc/ref/models.rst @@ -1278,6 +1278,15 @@ avatar, if it's not set then no default avatar is generated. Generate a default avatar for each record using the field. +ChatMixin +========= + +.. class:: ChatMixin + +A mixin_ to activate a `model-ir.chat.channel` on any +:class:`~trytond.model.ModelStorage` record. + + .. _mixin: http://en.wikipedia.org/wiki/Mixin .. _JSON: http://en.wikipedia.org/wiki/Json .. _UNION: http://en.wikipedia.org/wiki/Union_(SQL)#UNION_operator