I need to customize my module, how can i customize?
@ Http.route ('/ web / session / change_password', type = 'json', auth = "user")
def change_password (self, fields)
I need to customize my module, how can i customize?
@ Http.route ('/ web / session / change_password', type = 'json', auth = "user")
def change_password (self, fields)
@Lokesh EM
Just import the original controller module class and create a new class that inherit from the original controller class and override the method with the new route and if you don't need to do anything else in the method override just call super.
Like:
from addons.web.controllers.main import Session
from odoo import http
class MySession(Session):
@http.route('/web/session/change_password', type='json', auth="user")
def change_password(self, fields):
return super(MySession,self).change_password(fields)
You can use empty decorator, if don't need to change anything there:
@http.route()
tankyou
Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
1
apr. 24
|
29538 | |||
|
1
mar. 15
|
7207 | |||
|
1
mar. 15
|
6192 | |||
|
1
mar. 15
|
8646 | |||
|
4
nov. 24
|
6410 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Odoo Development Tips: https://old.reddit.com/r/learnodoo/