Odoo Help

Welcome!

This community 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.

0

Employee Self Service

By
Programmer
on 10/19/14, 4:06 AM 899 views

I am creating a module for Employee Self Service . I want to achieve 

1) Employee can only view his details . (out of which Employee can only edit  Contact Information )

2) Disable Create that appears in fields dropdown in the form.

how can we achieve such restriction from python class 

class hr_employee(osv.osv):

    _name = "hr.employee"
    _inherit = "hr.employee"
    _description = "Employee"
        

hr_employee()

0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 10/20/14, 5:44 AM

For only viewing your own details, I think the fastest way is to create a view with a fixed domain, for example "[('id','=',uid)]" or something like that. That way, for that view the user will only be able to see his own details.

For each object you want the "create" button to disappear you need to work the access rights for the said user. If he/she has create access rights on for example "hr.employee.contract" object, then in the list it will say "Create". If the user has only read rights, those options will disappear.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/19/14, 4:06 AM
Seen: 899 times
Last updated: 3/16/15, 8:10 AM