콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
2437 화면

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 ..

아바타
취소