跳至内容
菜单
此问题已终结
2 回复
13370 查看

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

形象
丢弃
相关帖文 回复 查看 活动
1
6月 24
442
1
2月 16
4942
1
9月 23
2258
2
10月 22
21494
0
9月 22
1960