Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2761 Vizualizări

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 

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mai 25
1638
1
apr. 25
3516
1
apr. 25
1094
4
mar. 25
5923
2
feb. 25
1949