Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3775 Prikazi

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
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
3
avg. 25
2918
1
maj 25
2811
1
apr. 25
4645
1
apr. 25
2094
4
mar. 25
7263