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

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


Imagine profil
Abandonează
Autor Cel mai bun răspuns
field name="projects" invisible="not parent"


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

Imagine profil
Abandonează
Cel mai bun răspuns

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)

Imagine profil
Abandonează
Cel mai bun răspuns

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




Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
feb. 25
1282
2
apr. 17
3433
0
mai 24
1131
0
apr. 24
1273
1
apr. 24
2489