Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
5103 Näkymät

Hi

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

Thanks in advanced.

Avatar
Hylkää
Paras vastaus

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'
Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
syysk. 19
98
1
heinäk. 17
4249
4
elok. 16
8467
1
toukok. 16
5080
2
maalisk. 16
7349