Skip to Content
मेन्यू
This question has been flagged
1 Reply
4156 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
5
सित॰ 25
22663
3
अग॰ 25
3323
1
मई 25
3224
1
अप्रैल 25
5005
1
अप्रैल 25
2372