Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
3706 Vues

Im building a customized page in the customer portal as a controller. I need to find the logged in's user corresponding event.booth . This is the query that i perform:


stand = http.request.env['event.booth'].search([('partner_id', '=', request.uid)])

i noticed that partner_id and uid are not the same so now i am wondering how to compare the partner id to the user id in order to get the corresponding record?

I have tried comparing the names using partner_id.name and uid.name

I have also tried getting the linked partner_id from the user by comparing request.uid.name and partner_id

Unfortunately none of the above worked out.

How i can i compare the user id and the partner_id ?

Avatar
Ignorer
Meilleure réponse

Hi Josef ,

Try,

stand = http.request.env['event.booth'].search([('partner_id', '=', request.env.user.partner_id.id)])



Hope it helps,
Kiran K

Avatar
Ignorer
Auteur

This was the solution. Thank you so much!

Publications associées Réponses Vues Activité
0
mai 24
1353
1
oct. 23
3027
1
sept. 25
2014
2
août 25
2535
2
juin 25
954