Skip to Content
Menu
This question has been flagged
2 Replies
3850 Views

Hi, I have Community version of V13, I'm very new to Odoo.


I can't seem to find how can I make it so in contacts, partner_id would have a multi-select function, meaning more than one selection, same with custom field. I believe that is achieved with many2many ? However, I can't change that for partner_id because it just spits out that I should be doing this in python, and as for custom field it just asks me to create a new relation I guess? 


Any help is appreciated. Thanks.

Avatar
Discard
Best Answer

Hi Spaudos:

You will not be able to change the definition of the partner_id field without making code customization. In any case, you should not change the partner_id field definition since it will break things because this field is part of the Odoo code base. You can add new custom fields and use them. Niyas has provided some good links that provide more information.

Avatar
Discard
Best Answer

Hi,

For selecting multiple values into a field you can use Many2many field. For adding a many2many field, it is done like this,

partner_ids = fields.Many2many('res.partner', string='Recipients')

The above is very basic way, and in the XML side,

<field name="partner_ids" widget="many2many_tags"/>


For more see :- How To Create Many2many Field In Odoo

Thanks

Avatar
Discard