October 26, 2014, odoo

Form widgets for many2one fields in Odoo

Index

  1. many2one widget (default)
  2. many2onebutton widget

many2one widget (default)

many2one widget

Options

  • no_quick_create - remove the Create and edit... option.
  • no_create_edit - remove the Create "foo" option. many2many widget
  • no_create - no_quick_create and no_create_edit combined.
  • no_open - in read mode: do not render as a link.

Example

<field name="field_name" options="{'no_create': True}"/>

many2onebutton widget

This widget seems rather pointless. It’s just a clickable circle.

  • It’s red if the field is empty. Clicking on the red circle opens a form for creating a new related item (in a modal window). many2manybutton widget

  • It’s green if the field is not empty. Clicking on the green circle opens a form for editing the related item (in a modal window). many2manybutton widget

There doesn’t seem to be a way to use this widget to select a preexisting item.

Example

<field name="field_name" widget="many2onebutton"/>

Comments