Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
6938 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
20297
1
mar. 15
3790
0
apr. 24
1853
4
nov. 23
5943
0
okt. 23
1713