Search code examples
pythonodooodoo-8openerp-8livechat

How to override odoo im_chat.js file?


I want to customize code in im_chat.js -> im_chat.ConversationManager with my own javascript file, not changing any code from im_chat.js file.

Can anyone tell me good practice on how to do this?

Here are the functions i want to customize:

  • List item
  • window_title_change
  • apply_session
  • activate_session
  • delete_session
  • received_message

Solution

  • Try this method:

    openerp.your_module = function(instance) {
    im_chat.ConversationManager.include({
        window_title_change : function(){
            //Your code
        }
      });
    };