İçereği Atla
Menü
Bu soru işaretlendi
67 Görünümler

I have a model defined like this:


```

analyst_id = fields.Many2one(

"res.partner",

string="Analyst",

required=True,

domain=[

("is_company", "=", False),

# ("parent_id", "=", self.env.company.partner_id),

],

help="Analyst who performed this analysis",

default=lambda self: self.env.user.partner_id,

)

```


When I comment out the parent_id domain, the dropdown breaks: it opens and closes right away as if there are no results.


The fields should be correct since I check these in validation too and there it works.


In essence I want the dropdown to only show contacts that belong to the contact of the current company. Analysts are not users in Odoo so we cannot reference users here.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Eyl 25
335
1
Eyl 25
325
1
Eyl 25
376
2
Ağu 25
584
2
Ağu 25
683