Managing dynamic routes
In website development projects, it is often the case that we need to create pages with dynamic URLs. For example, in e-commerce, each product has a detailed page linked with a different URL. In this recipe, we will create a web page to display hostel details.
Getting ready
Add basic fields in the hostel
model:
from odoo import fields, models class Hostel(models.Model): _name = 'hostel.hostel' _description = "Information about hostel" _order = "id desc, name" _rec_name = 'hostel_code' name = fields.Char(string="hostel Name", required=True) hostel_code = fields.Char(string="Code", required=True) street = fields.Char('Street') street2 = fields.Char('Street2') zip = fields.Char('Zip', change_default=True...