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

Hello to everybody,

I have a field, in a custom module, like: 'user_ids': fields.many2one('res.users', 'User')

I need this field contains only users belonging to a certain group, for example test, but I don't know how set the domain for this kind of relation.

anybody could help me? Thanks in advance

Simone

الصورة الرمزية
إهمال

in action part do like this <filed name="domain">'id','=',uid</field>

الكاتب

Thanks for the anserws, i have tried but it doesn't work properly. At the moment i am looking for another way to do that.

أفضل إجابة

On OpenERP 7.0 (and perhaps earlier) in the ir.actions.act_window record, you want a line similar to:

<field name="domain">[('id','=',uid)]</field>
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أغسطس 15
5955
5
مايو 24
25164
5
سبتمبر 22
11669
1
فبراير 22
26124
1
أبريل 24
13730