Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
9932 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Jun 22
5881
1
Mar 15
5644
2
Agu 20
10721
1
Mei 19
9698
1
Mei 15
21810