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)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 4 24
|
26488 | ||
|
1
thg 3 15
|
5624 | ||
|
1
thg 3 15
|
4584 | ||
|
1
thg 3 15
|
6532 | ||
Force change password first login
Đã xử lý
|
|
4
thg 11 24
|
2603 |
Odoo Development Tips: https://old.reddit.com/r/learnodoo/