Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
The Question has been closed for reason: not relevant or out datedby
Hello all. I have this situation:
To use some API (as google ones) I need pass as parameter the "Developer Key", it is a long char as part of the "url" we need to pass a parameter "The KEy"
It is really ugly pass this kwy wired in my soource code, due to if other person want to use my code i need to put free my key IMHO it is not correct.
What did i tried.
1.- Just declare a wired piece of code in my js file adding the script (It works) the issue with it is outside the "openerp.name_of_module" declaration, i can not access to server configuration due to the leak of conexion yet.
It only make the "append" in this way, i don't understand why the init: of my widget in this point doesn't work it is the only way it has worked for me.
2.- Put in the init:
I put the code in case one on init (in this point i can access to server and make an rpc request in this way extract the key from the server config) but the script is not loaded.
3.- Put in start:
I thought, "Ok i need render first" then i repeat this code in start: method and it doesn't declare the information.
4.- Overwrite the web.controllers.main.html_template variable directly in the __init__ of my module, but I think it is too dangerous if we want to load from apps.
There is some "correct way to do that?" or the 2 ways it works are the only correct Wired and __init__ ?
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
|Asked: 10/19/13, 6:35 PM|
|Seen: 1020 times|
|Last updated: 3/16/15, 8:10 AM|