Skip to Content
Menú
This question has been flagged
2 Respostes
9944 Vistes

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
Descartar
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
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
1
de juny 22
5890
1
de març 15
5649
2
d’ag. 20
10727
1
de maig 19
9713
1
de maig 15
21817