I have some fields in a module which i want to access as many2one fields in my module but fails to access the fields.
Here is my code:-
class location_rental(models.Model):
_name = "location.rental"
location_id = fields.Char('Location_id', required=True)
location_name = fields.Char("Location Name")
row = fields.Char("Row")
column = fields.Char("Column")
level = fields.Char("Level")
class rental_pet(models.Model):
_name = 'rental.pet'
location_id = fields.Many2one('location.rental.location_id', string="Location Id")
tier = fields.Selection(related="location_id.tier", string="Tier")
row = fields.Many2one("location.rental.row", string="Row")
I am accessing many2one fields as shown in above code but it shows an error. May I get some help?