A lot of the communication in the company is quick and dirty chat like discussion about a specific resource (Sale, Purchase, …). Tryton should have a way to easily integrate those discussions with the workflow of its users.
Those messages would be different than the notes as they would not be related to the resource itself but rather to the handling of the resource (or anything else) by people working in Tryton.
With the introduction of the Real-time notification it’s now possible to allow people to communicate about a resource using a chat-like technology.
We propose to add a new model
ir.chat.message that will store those chat message and their reference to the resource which it concerns.
Parsing the content of the messages to allow for notification using the
@ sign looks like a good idea but it will probably require another mechanism for storing more permanent notifications. I wonder if just like in discourse those
@ notifications shouldn’t also notify group of users (maybe using another prefix). Adding link to other database resource is also something that we can think that user will want to use.
ir.chat.message model will use four RPC methods:
- get(resource, timestamp, direction): which will retrieve messages either before a date or after a date.
post(resource, message): which will post a message on the resource chat, the clients will be then be notified a new message has been posted and will thus trigger a call to
- subscribe(resource, session): which subscribe a user session to a resource
- unsubscribe(resource, session): which unsubscribe a user session to a resource
The notification of the client (in order to call get when a new message is available) will use the bus from the notification blueprint.
The actual standard in communication chats seems to be to put the author messages on one side of the chat window and the messages of the other participants on the other side. I think that using the same behaviour is a good idea.
As in GTK using a treeview is not efficient when storing a lot of widgets, a different orientation has been taken by Polari. They are using a TextView with specific tags to denote the irc nicknames and time or hours. This way of doing would also suit well the way we could do in sao (a
p in it or something like that).