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

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
8月 25
2646
1
5月 25
2664
1
4月 25
4517
1
4月 25
1981
4
3月 25
7103