Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
13381 Представления

Hi, when I insert a One2Many in TransientModel and their inverse field many"One in ModelModel Odoo tell it's not possible becouse the relation betwen ModelModel and TransientModel can't be.

¿Why is the soluction for insert a One"many Field in TransientModel?


Tranks.

Аватар
Отменить
Автор

Great solution. tranks!

Лучший ответ

You need to use a Many2many field to solve the relationship because Many2many fields does not need an inverse field. This is happening since I start using Odoo(OpenERP 6.0.3) and the concept has not changed

Аватар
Отменить
Лучший ответ

The one2many field is essentially the inverse relation corresponding to a many2one field.

As the error message says, you cannot have a many2one from a Model to a TransientModel, but you can have a many2one from a TransientModel to a TransientModel. So you can have a one2many in a TransientModel, as long as the comodel of that field is also a TransientModel.

Raphael

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
июн. 24
442
1
февр. 16
4958
1
сент. 23
2266
2
окт. 22
21499
0
сент. 22
1968