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

Hi,,,,

I want apply domain in fillter 

like this:

  name="appointments"
domain=" [('field_name','=',user.field_name.id)]"/>


But give me error I can't  use composed field ...... how can i apply domain ???????????????????


Avatar
Vazgeç
En İyi Yanıt

Hi,

The error you are getting is because you are trying to use a composed field in the domain of a filter. Composed fields are not supported in the domain of a filter.

To apply a domain to a filter, you need to use the field name, not the composed field name. In your example, the field name is field_name, so the correct domain would be:

domain="[('field_name','=',user.field_name)]"

an example of how to apply a domain to a filter in Odoo:

<filter name="appointment_by_partner" domain="[('partner_id','=',user.partner_id)]"/>


Hope it helps

Avatar
Vazgeç

domain=" [('unit_divsion','=',parent.unit.unit_division)]"/>
if in this case, what should i do, i need the unit_division.