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

field name="projects" invisible="'parent'=False"
can anyone please help me what's wrong with syntax ....

Actually I'm not getting any syntax error but its not executing so anyone know odoo 17, please help


Avatar
Vazgeç
Üretici En İyi Yanıt
field name="projects" invisible="not parent"


this is actually an syntax issue above code solved my issue... thank you for your suggestions

Avatar
Vazgeç
En İyi Yanıt

In Odoo 17, the syntax for an invisible field has changed.  

It changed from 

"(['myfield','==','blue'])"

to

"myfield=='blue'"


See https://www.odoo.com/documentation/17.0/developer/reference/user_interface/view_architectures.html#


and jump to the detail by searching for  Whether the element is visible (False) or hidden (True)

Avatar
Vazgeç
En İyi Yanıt

Hi 

In odoo 17 instead of attrs try as following 

field name=”field_name” invisible=”state != ‘draft’ ”  readonly=”state == ‘confirm’"

if it is for fields inside a one2many field,


field name="vehicle_id" column_invisible="parent.move_id not in ('out_invoice','out_refund')"



Regards




Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Şub 25
1233
2
Nis 17
3391
0
May 24
1109
0
Nis 24
1247
1
Nis 24
2459