Skip to Content
Menu
This question has been flagged
2 Replies
287 Rodiniai

Hello,

I am using the latest Odoo 18 version for project and timesheet management. 

I am engaging contractors to work on individual projects and to record their times using the timesheet. I want these contractors to only be able to see their assigned projects and times. I also do not want the contractors to be able to create new projects or to edit their assigned projects. 


I am looking for help on what Domain Filter record rules I need to write and what groups need to be setup and the ACL settings. 


I was given the following code to use in the project.project and account.analytic.account model -


[('user_id', '=', user.id)]


However, it is not working. Furthermore, there is no user_id field in account.analytic.account. I was then told use the account.analytic.line model but it is still not working. 


My contractors can still see other contractors' projects and timesheets.


Any help would be appreciated.


Note: I am on the One App Free plan.



Portretas
Atmesti
Best Answer

Hii,

after assign a project of user please make record rules 
Settings > Technical > Security > Record Rules
Model : project.project
Rule Name : as your Work
and set domain like 
[('user_id', 'in', [user.id)]


and also you can select group as per your requiement
i hope it is use full
here is pic of record rule

select access right as per you work

Portretas
Atmesti
Best Answer

For Projects:

  • Go to Settings > Users
  • Select a user
  • Under Access Rights, set:
    • Project: User
      • ❌ They can’t manage all projects
      • ✅ They can access only the projects they are assigned to

For Timesheets:

  • Under Access Rights, set:
    • Timesheets: Employee
      • ✅ They can log and view their own timesheets

Portretas
Atmesti