Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
3778 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
2921
1
mai 25
2813
1
avr. 25
4647
1
avr. 25
2097
4
mars 25
7264