コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
11486 ビュー

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


アバター
破棄
著作者 最善の回答
field name="projects" invisible="not parent"


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

アバター
破棄
最善の回答

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)

アバター
破棄
最善の回答

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




アバター
破棄
関連投稿 返信 ビュー 活動
0
2月 25
1497
2
4月 17
3630
0
5月 24
1273
0
4月 24
1419
1
4月 24
2694