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

Hallo Everyone,

I want to show some information in the employee form view (overtime, remaining leaves and so on..). But I dont want every employee seeing these information for every other. I want to show these information only for the current logged in user, when he see his details in form view. Others will see only his public information in form view.

Is there a possiblity to show a field / smart-button only for current logged in user ?

Thanks for any pointers.

Ram

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Hallo both,

thanks for the tip.

if I use attrs="{'invisible': [('user_id', '!=', uid)]}" with a field in form view, I am getting an error while saving the view. "uid not found". If i enclose uid in 'uid', then it accepts without an error, but the field is not even displayed for logged in user.

الصورة الرمزية
إهمال
أفضل إجابة

Shriram,

In employee master you have a user field, you can use this to hide your field, as when the employees concerned user logs in, this field will be hidden.

for this you can use attrs="{'invisible': [('user_id', '!=', uid)]}", this will hide that field if current employee is not of logged user

Hope it will help u

الصورة الرمزية
إهمال
أفضل إجابة

Shriram,

You must try attrs!

Make the fields visible only when the user_id=uid!

Employee has the 'Related User' field!

For attrs, you may check here.

Thanks.



الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
نوفمبر 16
1320
How to hide fields? تم الحل
3
مارس 15
28638
2
مارس 15
4571
1
يونيو 23
2864
1
مارس 16
10193