تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5013 أدوات العرض

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'
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
سبتمبر 19
98
1
يوليو 17
4176
4
أغسطس 16
8401
1
مايو 16
4985
2
مارس 16
7278