Odoo Aide

1

0
3 Réponses
0
shriram sampat Allemagne
11/09/2015 10:33

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.

0
Avatar

Pawan Inde

--Pawan--

1597
| 4 4 8
Hyderabad, Inde
--Pawan--


Pawan Inde
11/09/2015 10:07

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

0
Avatar

Serpent Consulting Services Pvt. Ltd. Inde

--Serpent Consulting Services Pvt. Ltd.--
Serpent Consulting Services Pvt. Ltd.
http://www.serpentcs.com
4943
| 7 6 10
Gandhinagar, Inde
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. is an Official Odoo Partner, working on Odoo ever since 2007, experience of 11+ years and witnessed the growth of Odoo.

We are a team of 80+ experts on various verticals. Our portfolio of products can be seen at http://www.serpentcs.com and http://www.serpentcs.in

Our Expertise and Services:

  • Odoo Support

  • Odoo Development

  • Odoo Training

  • Odoo Migration

  • Odoo Implementation

  • Odoo Consulting

Our 290+ Apps on Appstore : https://apps.odoo.com/apps/modules/browse?author=Serpent Consulting Services Pvt. Ltd.

Thanks.

Serpent Consulting Services Pvt. Ltd. Inde
11/09/2015 09:29

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.



Poser une question
Étiquettes
Keep Informed
1 Abonné(e)s
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now