Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
8413 Lượt xem

You can use One2many to get a reference to all the records that reference the record with a Many2one field. Is there a similar inverse field for the Reference field type?

Ảnh đại diện
Huỷ bỏ

can you elaborate a bit more?

Tác giả

I have a model with a fields.Reference that can refer to rows from 6 models. I want an inverse reference from some of those 6 models back to the original one.

Tác giả Câu trả lời hay nhất

 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

\

dear Tamás Dombos
yes you can do it.
 as example you have:
- model1 and model 2.
field_model2= many2one with model1
field_model1= one2many with model2 by field_model2
I hope I helped you.
Ảnh đại diện
Huỷ bỏ
Tác giả

The question concerned the fields.Reference that allows you to refer to rows of several models, not Many2one that only allows you to refer to rows of one model.

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 19
98
1
thg 7 17
4206
1
thg 5 16
5033
1
thg 3 16
5034
2
thg 3 16
7309