Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
7157 Prikazi

def default_domain_users(self):

at=[]

userx = self.env.user.login

if userx == "bendjeddou.o":

ids_biens=self.env['gmat.journaleline'].search([('exp_P','=',0),('rapJor_ids','=',self.id)])

for item in ids_biens:

at.append(item.bien_id.id)

else:

ids_biens=self.env['gmat.journaleline'].search([('rapJor_ids','=',self.id)])

for item in ids_biens:

at.append(item.bien_id.id)

return [('id','in', at)]

user_filter = fields.Many2one('gmat.nbien',domain=default_domain_users)

Avatar
Opusti
Best Answer

try self._id or self.ids[0]

Avatar
Opusti
Avtor Best Answer

hi hilari, no working this instruction


Avatar
Opusti

then check the self object. and from where this function is called

Related Posts Odgovori Prikazi Aktivnost
1
dec. 23
20623
1
mar. 15
3951
0
apr. 24
2110
4
nov. 23
6250
0
okt. 23
1991