Making a path accessible from the network
In this recipe, we'll look at how to make a URL of the
http://yourserver/path1/path2 form accessible to users. This can be either a web page or a path returning arbitrary data to be consumed by other programs. In the latter case, you would usually use JSON format to consume parameters and offer your data.
We'll make use of the
library.book model, which we looked at in Chapter 4, Application Models; so, if you haven't done so yet, grab the initial module from https://github.com/PacktPublishing/Odoo-14-Development-Cookbook-Fourth-Edition/tree/master/Chapter13/00_initial_module, so that you will be able to follow the examples.
How to do it...
We'll need to add controllers, which go into a folder called
controllers by convention:
- Add a