Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Is it possible to save messaging history with instant messaging?

By
Laura Jarvenpaa
on 9/9/13, 7:27 AM 2,520 views

Current version of Instant messaging module doesn't save the messaging history if you close the chat. That's very inconvenient if you have to exchange information with other people and you have to check it out again later.

So is there any way to save messaging history somewhere and clear it when it is not anymore needed?

I know that you can use messages with social media module with preserves the history but they are more like sending e-mails and we are currently using skype for instant messaging so people are used to communicate with others thought instant messaging system and messages provided by social media module are not flexible enough.

2
Laura Jarvenpaa
On 9/10/13, 3:40 AM

Didn't find module Jean-Sébastien SUZANNE was referring to (found it later see edited comment in the end) but because creating this kind of view was rather easy I created it by myself. Here is code if some one else wants to create similar view:

python file

         from openerp.osv import fields,osv
         class im_history(osv.osv):
             _inherit = 'im.message'  
         im_history()

xml file

  <record id="view_im_history" model="ir.ui.view">
    <field name="name">im.message.tree</field>
    <field name="model">im.message</field>
    <field name="arch" type="xml">
            <tree string="Instant Message History">
                <field name="date"/>
                <field name="from_id"/>
                <field name="to_id"/>
                <field name="message"/>
            </tree>
    </field>
  </record>

  <!-- Top menu item -->
    <menuitem name="Instant Messages history"
        id="im_history_root"
        groups="base.group_user"
        sequence="10"/>

    <record id="open_view_im_history" model="ir.actions.act_window">
        <field name="name">Instant messaging history</field>
        <field name="res_model">im.message</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="view_im_history"/>
    </record>
    <!-- Had to add dummy parent menu for actions because top menus arent' clicable in OE -->
    <menuitem name="Actions" id="im_history" parent="im_history_root" groups="base.group_user"/>
    <menuitem action="open_view_im_history" id="menu_open_view_im_history" parent="im_history" sequence="20" groups="base.group_user"/>

Access rights are handled right automatically because im.message object already has record rule that user can see only messages sent to/from user.

Edit: BUT as was pointed out by Jean-Sébastien SUZANNE in the comment SUPERUSER by passes the rules so if you don't want that you can test web_im module found here: https://bitbucket.org/anybox I haven't tested it but it is said to be working.

Good. I didn't see the rules. But for me the rules is not enough because SUPERUSER by pass the rules.

Suzanne Jean-Sébastien
on 9/10/13, 5:26 AM

IM module is for trunk version, my module can be use on the OpenERP v7 without patch

Suzanne Jean-Sébastien
on 9/10/13, 5:27 AM

Ok, for us it is ok if the superuser sees the messages because then employees won't use it for chatting non work related stuff but I added link to your module list in the end of my answer so that others can use that if they need higher security.

Laura Jarvenpaa
on 9/10/13, 5:52 AM
1

Hi,

The message are already saved on the model im.message (table im_message). But not view add.

In the module web_im for OpenERP 7.0 the view exist and the user can see only this messages.

I tried to find this module from launchpad but couldn't find anything else than some references on bug reports. Also, google returned no result. Do you have some link for this module? Thanks!

Laura Jarvenpaa
on 9/9/13, 11:24 PM

Never mind. I created myself view to show messages from that table. Works fine.

Laura Jarvenpaa
on 9/10/13, 3:28 AM

You could find this module on bitbucket. It is a module from anybox. You need the module web_socketio and if you know the buildout, you should use long polling_buildout

Suzanne Jean-Sébastien
on 9/10/13, 5:31 AM
0
Mark Stair
On 10/21/15, 10:57 PM

IM messaging is automatically saved in Messaging>Live Chat>History

So nothing really needed to show chat history.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 9/9/13, 7:27 AM
Seen: 2520 times
Last updated: 10/21/15, 10:57 PM