This question has been flagged
1 Reply
4760 Views

Hello.

I have implemented custom text fields as well as select fields on the order page.

I wish to implement checkboxes with the ability to select multiple values per field. As I understand, I need to use the many2many option.

I am a bit confused in what to add in the "object relation" that turns up when i use many2many. it seems to require a model, do I create a new model with the values I need for my checkboxes?  Or how else do I declare the values ?(in selection , values are declared on the same page in the "selection options")


Kindly assist.  Thank you

Avatar
Discard
Best Answer

The "object relation" is the name of the model with which the model has a many2many relationship. For example, the Contact (res.partner) model has a many2many relationship with the Tags (res.partner.category) model. The definition of the field Tags on the Contact model, will have an "Object Relation" of res.partner.category. Odoo will create a relationship table in the database with 2 fields that are foreign keys to the Contact and the Tags models to store the many2many relationship between the 2 models.

Avatar
Discard