Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
6884 Zobrazení

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
Zrušit
Nejlepší odpověď

try self._id or self.ids[0]

Avatar
Zrušit
Autor Nejlepší odpověď

hi hilari, no working this instruction


Avatar
Zrušit

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

Related Posts Odpovědi Zobrazení Aktivita
1
pro 23
20186
1
bře 15
3719
0
dub 24
1822
4
lis 23
5858
0
říj 23
1669