many2many fields

If you are not familiar with basic database concepts you should start by reading this introduction.

many2many fields are similar to many2one (i.e. they create a new database relationship), except that multiple records can be selected.

These are sometimes displayed as ‘tags’, using the many2many_tags widget, as shown on Contacts:

Multiple tags can be selected for a vendor (or other contact).

They can be displayed using checkboxes using the many2many_checkboxes widget (as in Account Journal payment methods):

Multiple payment methods can be selected for a journal.

It’s also possible to display a list (similar to one2many) using the many2many widget:

The “Send and Print” invoice wizard has examples of two other many2many ‘widgets’:

  1. many2many_tags_email (for email recipients)
  2. many2many_binary (for attachments)

Other widgets include:

  • many2manyattendee (calendar)
  • documents_kanban_color_tags (Documents app)

Related: add relational fields using Studio, adding other field types

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s