跳至内容
菜单
此问题已终结
2 回复
2389 查看

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', '')




形象
丢弃

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

编写者 最佳答案

hi Niyas , I already edit ..

形象
丢弃