Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2769 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é
1
mai 25
1657
1
avr. 25
3521
1
avr. 25
1098
4
mars 25
5930
2
févr. 25
1952