how many2many defined for custom module odoo

.py file

class notebook(osv.osv):
_name = "notebook"
_columns = {
    'title' : fields.char('Title', size=30, required=True),
    'tag_ids': fields.many2many(

class hello(osv.osv):
_name = 'hello'
_columns = {
        'note_ids': fields.many2many(

.xml file

many2many widget (default)
<field name="tag_ids" options="{'no_create': True}"/>

many2many_tags widget
<field name="tag_ids" widget="many2many_tags" options="{'no_create_edit': True}"/>

many2many_checkboxes widget
<field name="tag_ids" widget="many2many_checkboxes"/>

many2many_kanban widget

<field name="tag_ids" widget="many2many_kanban">
        <field name="name"/>
            <t t-name="kanban-box">
                <field name="name"/>

x2many_counter widget
<field name="tag_ids" widget="x2many_counter" string="things"/>

many2many_binary widget
<field name="tag_ids" widget="many2many_binary" string="Attach a file"/>


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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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


Connecting to %s