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.

2

Filter projects by user

By
Odooveloper (by Rui Franco)
on 11/6/13, 9:43 AM 1,074 views

Cheers!

Here's what I'm trying to do: when a user is creating timesheet records (Human resources/Timesheet activities), I want him to see only the accounts related to the projects he's a member of.

I've created a field in account_analytic_account to save the project_id but, then, when it comes to the domain, I can't do something like

domain="[(uid,'in','project_id.members')]"

Any ideas?

1

Daniel Reis

--Daniel Reis--
3436
| 6 7 9
Lisbon, Portugal
--Daniel Reis--

Author of the "Odoo Development Essentials" book.

Applications Manager at Securitas Portugal

Github: https://github.com/dreispt

Twitter; @reis_pt


Daniel Reis
On 11/6/13, 10:52 AM

Try the other way around: [('project_id.members', 'in', uid)] (or user.id, if you're creating record access rules).

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: 11/6/13, 9:43 AM
Seen: 1074 times
Last updated: 3/16/15, 8:10 AM