Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
9986 Zobrazení

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
Zrušit
Autor Nejlepší odpověď
field name="projects" invisible="not parent"


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

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
úno 25
1207
2
dub 17
3350
0
kvě 24
1090
0
dub 24
1234
1
dub 24
2410