Odoo Help


Where to place my own javascript function in openerp

on 1/21/14, 3:05 AM 1,239 views

I am trying to plug some of my javascript function for CRM module in openerp. what i want to achieve is -

  • disable right click
  • disable text selection.

Here below is the code of my js function.

 noRightClick = function () {
    document.oncontextmenu = function(){ return false; };


noSelect = function () {
    document.onselectstart = function () {
      if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") {
        return false;
      } else {
        return true;

Please suggest where should i place these functions, so that it applicable to only CRM module.

Thanks in advance...



| 2 2 4
Buenos Aires, Argentina

Python developer, big fan of sailing

On 1/21/14, 6:19 AM

You can find information on how to do that on the web module documentation:

https://doc.openerp.com/trunk/web/module/ https://doc.openerp.com/trunk/training/

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/21/14, 3:05 AM
Seen: 1239 times
Last updated: 3/16/15, 8:10 AM