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

i added this field in my custom module

class DailyTarget(models.Model):
_name = 'user.target'
_description = 'User Target'
    agent_id = fields.Many2one('res.partner')

i need to get  only partners in agent_id which are users too.


which are exists in res.users only 

Avatar
Ignorer
Meilleure réponse

Hi

Try the following code,

class DailyTarget(models.Model)        

_name = 'user.target'        

_description = 'User Target'

agent_id = fields.Many2one('res.partner', domain=[('user_ids', '!=', False)])  


Hope it helps

Avatar
Ignorer
Publications associées Réponses Vues Activité
3
août 25
2585
1
mai 25
2630
1
avr. 25
4480
1
avr. 25
1944
4
mars 25
7059