Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5251 มุมมอง

Hi

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

Thanks in advanced.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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'
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ย. 19
98
1
ก.ค. 17
4437
4
ส.ค. 16
8614
1
พ.ค. 16
5219
2
มี.ค. 16
7487