Odoo Help


How to arrange Radio buttons in vertically

on 5/18/16, 4:14 AM 3,014 views

I have  around 12 radio button options in my custom form , its bit ugly to scroll and input the values for this options,

how do i arrange the radio buttons horizontally ? Any tips or tricks to achieve this ?

You could either do this with a group which you add colspan and rowspan on or with a simple HTML table, in which you put all the radiobuttons.

on 5/18/16, 5:37 AM
--Hilar AK--



Hilar AK
On 2/15/17, 5:47 AM

Hi Nishad,

Please use attribute widget="radio" options="{'horizontal': true}" in your radio buttons.
Hope this will helps you

Cheers !

On 5/18/16, 6:36 AM

Thanks for your comments Emipro Technologies.. You are right ... but the scenario is something different like as follows,

i have a field 

'f1': fields.selection([('1', '1'),('2', '2'),('3','3'),('4','4'),('5','5'),('6','6'),('7','7'),('8','8'),('9','9'),('10','10')], 'Communication Skills'),

similarly 11 more other fields like f2,f3, etc... and in my view.xml am making it like 

<group colspan="4" col="24">
<field name="f1" widget="radio"/>
<field name="f2" widget="radio"/>

The above alignment keep individual filelds in horizontal but the options in vertical order ..

So how do i align my selection options in horizontal ? 


Hello Please have a look in update of my answer.

Emipro Technologies Pvt. Ltd..
on 5/18/16, 8:52 AM

Hi , That's still didn't work as i expected ! Basically the issue is my fields are selection fields and i think we cant align selection field entries horizontally.. Am giving widget="radio" for my selection field entries ..

on 5/19/16, 8:11 AM

can you paste your code or xml and screen of its output ? Will help you more on that.

Emipro Technologies Pvt. Ltd..
on 5/20/16, 5:42 AM

My .py file has fields as follows, 'q1': fields.selection([('1', '1'),('2', '2'),('3','3'),('4','4'),('5','5'),('6','6'),('7','7'),('8','8'),('9','9'),('10','10')], 'Overall Experience'), 'q2': fields.selection([('1', '1'),('2', '2'),('3','3'),('4','4'),('5','5'),('6','6'),('7','7'),('8','8'),('9','9'),('10','10')], 'Communication Skills'), .. .. .xml file has alignment as follows, This will display the field vertically not in horizontal way( I can't attach my image here ...... )

on 5/22/16, 12:50 AM

.xml file has fields as you suggested

on 5/22/16, 12:52 AM
Bharat Parmar (bhp)
On 2/15/17, 6:29 AM

horizontal radio button in odoo

Use your field f1 like this,

<field name="f1" widget='radio' options="{'horizontal': true}"/>

Emipro Technologies Pvt. Ltd..

--Emipro Technologies Pvt. Ltd..--
Emipro Technologies Pvt. Ltd.
| 6 7 8
Rajkot, India
--Emipro Technologies Pvt. Ltd..--

Being an emerging leader in IT market since 2011, Emipro Technologies Pvt. Ltd. has been providing a wide range of business solutions in Odoo & Magento. We are pleased to have a large pool of contented customers with our meticulous work in the domain of ERP & e-Commerce. A ray of relief & satisfaction to  our customers heart by our successful deployment in their organization, purely represents our success in Odoo platform. Hence, we take pride for being an Odoo partner with a vision of expanding our strategic alliances with our customers to offer them high value-added, trustworthy & cost effective solutions.


Since establishment, our business has span across 11 countries of the world. Our customers are companies of all sizes ranging from start-ups to large enterprises, who realize that they need a professional business solutions to generate revenue streams, establish proper communication channels or streamline business operations. Standing with strong determination of customer satisfaction, observing each minute detail of their business processes, providing proper guidance and moving forth to develop product accordingly adds our value and reliability among our customers. 


We are blessed with efficient, passionate & eclectic young developers who have come across almost all kinds of business profiles, working with full dedication, applying creativity & new features in existing modules and completing customer's projects successfully on predefined target. Our in-depth knowledge while giving business solutions in Odoo allows us to offer following services to our customers :


  • Consulting
  • Installation, Configuration & Customization
  • Training & Support
  • Maintenance
  • Upgradation
  • Documentation
  • Crafting community modules
  • Drafting videos on demand
  • Smart Apps development

We will be :) to welcome you @ www.emiprotechnologies.com to solve any kind of your business needs around Odoo. However we are just an inch away from you by email info@emiprotechnologies.com or a tweet to @EmiproTech

Emipro Technologies Pvt. Ltd..
On 5/18/16, 6:00 AM

Hi Nishad,

You have to manage columns inside group to achieve your goal for manage 12 radio buttons horizontally. For ex.

<group colspan="4" col="24">
<field name="radio_field1" />
<field name="radio_field2" />
<field name="radio_field3" />
<field name="radio_field4" />
<field name="radio_field5" />
<field name="radio_field6" />
<field name="radio_field7" />
<field name="radio_field8" />
<field name="radio_field9" />
<field name="radio_field10" />
<field name="radio_field11" />
<field name="radio_field12" />

As above  colspan="4" means merge 4 columns, default Odoo seperated all group in 4 coulmns. And col="24" means create 24 columns after merge those 4 columns and all 12 radio button will fit inside it.

It may help a lot.

Update : 
You can manage as like below.

<group colspan="4" col="10">
    <field name="radio_field1" />
<group colspan="4" col="10">    
    <field name="radio_field2" />
<group colspan="4" col="10">
<field name="radio_field12" />

I think you will get radio options as you want.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)


Asked: 5/18/16, 4:14 AM
Seen: 3014 times
Last updated: 2/15/17, 6:29 AM