跳至内容
菜单
此问题已终结
1 回复
2628 查看

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 

形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
1
5月 25
1342
1
4月 25
3388
1
4月 25
983
4
3月 25
5741
2
2月 25
1838