Odoo 16 building a website to the browser.which can be done by controllers of a module , controllers which help as to configure front end module and also helps to interpret browser request and send database .
2. ● Odoo 16 building a website to the browser.which can be done
by controllers of a module , controllers which help as to
configure front end module and also helps to interpret
browser request and send database .
● Here let us check how can we configure a particular controller
and how can we navigate a particular url and then return our
4. Just define a controllers directory and just create a python file , then define a class first .
Just define a class ;
And import http from odoo at the top.
5. • Define the particular HTTP root , which is a method decorator using for routing purpose which
allows to navigate for that particular url.
• Define http.route and /my/order is the url .
• type is http
• auth = user .(auth can be used for give the access for this url )
• website = True(Which means the controller is linked with the website.)
• auth are in different types , mainly public user and none.
• public means anyone can access to this url .
• user means only the login users can access.
• none means it is always active.
7. Just define a function .
• Then we can return the data that we are needed and if we need to fetch any datas we needed
from the backend and that can be fetch and then return here.
• The “Helloo” is return on the website.
8. • Here just put our url “/my/order” on the website we can see the output is shown the website
9. Check our company website
for related blogs and Odoo book.
Check our YouTube channel for
functional and technical videos in Odoo.