Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4713 Visualizzazioni

Hello,

 

I try to make a custom authentication module.

So i took inspiration(like copy paste and rename) from auth_oauth module in the addons folder.

this is my complete javascript file in:

module/static/src/js/auth_oauth.js

http://pastebin.com/7LRRNrsU

 

Next I wrote a controller in

module/controllers/main.py

http://pastebin.com/XSUAKdRH

 

I have also add the import in

module/__init__.py

>> import controllers

module/controllers/__init__.py

>> import main

 

and in the __openerp__.py

i add this
        'js': [
            'static/src/js/auth_oauth.js',
            ],
        'css': [
            'static/src/css/zocial.css',
            'static/src/css/auth_oauth.css',
            ],

 

The auth_oauth module is not installed.

When I try to debug, the javascript never come in the start function I declare in my js file.

It's like all the function in instance.web.Login.include is never included during the process.

I try to install the auth_oauth module and debug his javascript and his start function is call.

 

What i miss for the openerp javascript call my start function ?

Clement, thanks

Avatar
Abbandona
Autore Risposta migliore

I found....

it's realy easy but I try to find an answer too far away,

I juste give se same name in

openerp.Module = blabla

and the name of the folder which contains the module,

Both does have the same name because in the function with call the start, the folder name is given to the openerp var....

Thank.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
8
ott 24
22237
4
gen 19
3901
4
mar 25
3246
2
ago 24
1209
0
mag 23
1588