Skip to Content
Menu
This question has been flagged
2 Replies
9937 Views

Currently if I change m2m widget to checkboxes, it will show all the possible values in a single column. Is there a way to show them in 2+ columns?

e.g. Normaly they are shown:

 

Tag 1
Tag 2
Tag 3
Tag 4

and I would like them to show 

Tag 1
Tag 3
Tag 2
Tag 4

or 

Tag 1
Tag 2
Tag 3
Tag 4

The order of the Tags doesn't really matter.

Avatar
Discard
Best Answer

Hello Anti Nuga,

     here is the way to change look of many2many_checkboxes widget's view from single column to two-column.


You have to change single line in xml file of web module.

    path: web >> static >> src >> xml >> base.xml

     

<t t-name="FieldMany2ManyCheckBoxes">
    <t t-foreach="widget.get('records')" t-as="record">
        <div>
......

to
 
<t t-name="FieldMany2ManyCheckBoxes">
    <t t-foreach="widget.get('records')" t-as="record">
        <div class="col-xs-6">

 

Hope this will help you, Thanks!

Avatar
Discard
Best Answer

Hi Anti,

I think there is no ready widget available for the solution which you are looking for.

You can develop your own widget to achieve this thing.

Inside the user form the access right groups are filtered and grouped in checkbox, that example may help you to develop your own widget for Many2many field.

If you develop that new widget than don't forgot to share ;)


Hope this will help.

Regards,

Anil.

Avatar
Discard
Related Posts Replies Views Activity
1
Jun 22
5887
1
Mar 15
5646
2
Aug 20
10723
1
May 19
9705
1
May 15
21815