Odoo Help

0

Where to place my own javascript function in openerp

By
Krishnraj
on 1/21/14, 3:05 AM 1,147 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; };
  };

and

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

0
Gustavo
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.

Register

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)

Stats

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