Odoo Help


Is there any widget options documentation?

Jeff Beidler
on 10/28/14, 7:08 PM 7,181 views

Looking at various template XML files, I sometimes see something like this:

t-field-options='{"widget": "contact", "fields": ["address"], "no_marker": true}'

However, I can't find any detailed documentation for various options that are available for such a statement.  There's lots of stuff on "widgets", but it's all about writing Python code to create your own thingamajig.  Is there any documentation for the XML formatting widgets?

@Jeff, I'm also interested in this. I've purchased the theme developer handbook from Odoo's indiegogo campaign here: https://www.indiegogo.com/projects/bootstrap-themes-for-odoo-cms although the book is not likely to be released until the campaign finishes I believe it does cover the subject as it applies to the CMS/E-commerce and theme modules. Once I have read the book I will write back here with information on what I have learnt, however in the meantime if you find any resources covering widget creation and customisation I would be interested to know what you have found.

Luke Branch
on 10/28/14, 9:22 PM
Solution Architect
On 7/9/17, 10:35 PM

You can pass in the option inside t-field-options param as below

<div t-field="quotation.partner_invoice_id" t-field-options='{

"widget": "contact",

"fields": ["address", "name", "phone", "email"],

"no_marker": true


On 8/3/15, 6:22 PM

There's some basic Widgets documentation here: https://www.odoo.com/documentation/8.0/howtos/web.html#widgets-basics but that doesn't really cover the 'options' for widgets.

 One tip that I found that I'll leave here in case someone else comes looking (as I did): you can pass 'options' to the widget from the XML <field/> definition by setting an 'options' attribute to a JSON dictionary, like this:

<field name="myfield" widget='many2many_checkboxes' options='{"horizontal": 1}' />

This will set widget.options.horizontal to 1, and this option is then available within the QWeb template for the widget, so you can use options to alter the templated layout, for example.

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

2 follower(s)


Asked: 10/28/14, 7:08 PM
Seen: 7181 times
Last updated: 7/9/17, 10:35 PM