Skip to Content
Menu
This question has been flagged
2 Replies
1958 Views

Dears

what am trying to select one record to be default record by mark Boolean field to true .

once the boolean fields selected for one record the rest boolean for all rest records need to change them to read-only .

and if we unselected it again all  Boolean fields will return to normal (unread-only)


class entity_name(models.Model):

_name = 'compny.entity'

name = fields.Many2one('iqs.entity.city','')

entity_id = fields.Many2one('res.users', default = lambda self: self.env.user.entity )

default_entity = fields.Boolean(string='default entity')


class res_user_inherit(models.Model):

_inherit = 'res.users'

entity = fields.Many2one('iqs.entity', '')




Avatar
Discard

Hi, the question is not clear, can you edit it and make it clearfull

Author Best Answer

hi Niyas , I already edit ..

Avatar
Discard