Skip to Content
मेन्यू
This question has been flagged
1 Reply
3713 Views

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
Discard
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
Discard
Related Posts Replies Views Activity
3
अग॰ 25
2778
1
मई 25
2743
1
अप्रैल 25
4575
1
अप्रैल 25
2025
4
मार्च 25
7206