Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
5208 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
0
Sep 22
1812
1
Jul 22
2037
0
Feb 23
157
3
Agu 22
9151
0
Jul 22
2206