Skip to Content
मेन्यू
This question has been flagged
1752 Views

I want to know if there is a way in Odoo to assign a base route to a controller.

By that, I mean: Imagine I have a module called "App1", with a controller offering routes for this app.

I want all my routes to start with "/app1". 

Instead of having to repeat this on every '@route' decorator of my controller, can I set it globally so every route will be prefixed with this global one?


fictional example:

@controller_route('/app1'):
class MyController(Controller):
​@route('home')
​app_home():
​# is accessible via /app1/home
Avatar
Discard
Related Posts Replies Views Activity
1
मार्च 15
3753
0
मार्च 15
4652
2
अग॰ 25
2476
2
जून 25
874
0
मई 25
932