Skip to Content
मेन्यू
This question has been flagged
1 Reply
3498 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
2238
1
मई 25
2511
1
अप्रैल 25
4329
1
अप्रैल 25
1800
4
मार्च 25
6928