Skip to Content
Menu
This question has been flagged
1 Odpoveď
3587 Zobrazenia

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
Zrušiť
Best Answer

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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
3
aug 25
2564
1
máj 25
2611
1
apr 25
4444
1
apr 25
1907
4
mar 25
7049