Skip to Content
मेन्यू
This question has been flagged
1 Reply
5207 Views

Hello,

I would like to know if it is possible to create in a given model “X” a Many2many field defined as follows : 

field = fields.Many2many('X', string="description") 

When I'm trying to create this field, I'm getting the following error :

Implicit/canonical naming of many2many relationship table is not possible when source and destination models are the same


Avatar
Discard
Best Answer

Hi,

Try by specifying the relation table name along with field defintion.

field = fields.Many2many('model_name', 'relational_table_name', 'column1', 'column2', string="string")

Thanks & Regards

Avatar
Discard
Related Posts Replies Views Activity
0
सित॰ 22
1812
1
जुल॰ 22
2036
0
फ़र॰ 23
157
3
अग॰ 22
9150
0
जुल॰ 22
2206