Hi Kristof,
thanks for your reply. I will take a look to your code and see if I can use it.
In the days from the first post to this reply some changes have come:
- Partners are visible only to users that are associated to the same department 
(we created a relationship Partner-Department and use "hr" module to associate 
users to depts)

I created a function field in partner object called "visible" that computes if 
a partner belongs to any of the user's departments.
I added a global record rule where this field is checked to be True.
It works well to display any partner list. However, I am getting an error when 
trying to create a invoice (and I bet in other places too??) saying "You try to 
bypass an access rule (Document type: Partner)". This exception is not thrown 
if the record rule is disabled and the creation of the invoice is done.

The invoice includes partners that are visible by the user doing the operation.

Maybe I am not using the best approach to this issue: any suggestion is welcome.

Cheers,

Jose A. Corbacho




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=50400#50400

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to