Odoo Help

2

Filter projects by user

By
Odooveloper (by Rui Franco)
on 11/6/13, 9:43 AM 1,216 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--
3451
| 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).

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

Question tools

1 follower(s)

Stats

Asked: 11/6/13, 9:43 AM
Seen: 1216 times
Last updated: 3/16/15, 8:10 AM