want to show Many2one field on website (on page/form) but don't know how to, please help.
my base model on which 2nd model based on:
class Zones(models.Model):
_name = 'tests.zones'
_rec_name = 'name'
_description = "Tests Zones"
name = fields.Char(string="Zone Name", required=True)
description = fields.Text(string="Zone Description")
zone_status = fields.Selection([
('active', 'Active'),
('inactive', 'In-Active')
], string="Zone Status", required=True, default='active')
model which contains inheritance and used for website, requires to add in wesite form/page:
class ResUsersExt(models.Model):
_inherit = 'res.users'
contact_no = fields.Char(string='Contact No.')
address = fields.Text(string='Your Address', required=True, default='00')
zone_id = fields.Many2one('tests.zones', string="Your Zone", required=True, default="1")
regards