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

Hello there, I want to Remove Checkbox from tree view in wizard in odoo v16.

Here is the code,

def view_tree(self): 
return {
'name': "My List View",
'res_model': 'your.model',
'view_mode': 'tree,form',
'target': 'current', 
'domain': [],
'flags': {'hasSelectors': False},
'context': {}, 
'type': 'ir.actions.act_window',
}

I used ... 'flags': {'hasSelectors': False}, in OdooV15 and it worked there but not working in OdooV16


الصورة الرمزية
إهمال
أفضل إجابة

In Odoo v16, you can remove the checkboxes from the tree view in a wizard by setting the "selectable" attribute to "none" in the view's xml definition.

Here is an example:

...

You can also remove the checkboxes from the tree view by setting the "selectable" attribute to "none" directly in the action definition, like this:

In both cases, setting the "selectable" attribute to "none" will remove the checkboxes from the tree view and prevent users from selecting multiple records.

الصورة الرمزية
إهمال
الكاتب

Thankyou

I don't have this "selectable" attribute . Could you please give an example?

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
ديسمبر 24
3578
1
أكتوبر 24
1795
0
نوفمبر 23
1129
0
أكتوبر 23
1876
0
أبريل 25
5687