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

Hi

Someone has tried to fill a reference field by default? How to do it?

Thanks in advanced.

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

Hi @Alexei

The value of the reference fields is composed by the model of the reference selection model and the id of that model. For example to put the user admin value in a reference to res.users as one of the possible models, you could put it like this:

'res.users,1'
Ảnh đại diện
Huỷ bỏ
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
4261
4
thg 8 16
8481
1
thg 5 16
5091
2
thg 3 16
7364