跳至內容
選單
此問題已被標幟
1 回覆
2858 瀏覽次數

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
1777
1
4月 25
3606
1
4月 25
1192
4
3月 25
6063
2
2月 25
2034