تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
10808 أدوات العرض

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
فبراير 25
1355
2
أبريل 17
3478
0
مايو 24
1182
0
أبريل 24
1328
1
أبريل 24
2549