Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
5241 Vizualizări

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


Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
sept. 22
1823
1
iul. 22
2057
0
feb. 23
157
3
aug. 22
9190
0
iul. 22
2215