Community mailing list archives

community@mail.odoo.com

Re: Many2one field filter using child_of user login

by
Togar
- 09/04/2015 05:07:48
You need to add one additional many2one field on res.users, referenced to res.users itself, and the field name must be 'parent_id'. I guess that is the requirement of using child_of things.

On Fri, Sep 4, 2015 at 2:08 PM, vak0160 <vak0160.work@gmail.com> wrote:

Hello Community,

I have  a Many2one field referenced to model res.users, and I want this field filtered using child_of current user login.

I already tried with [('id', 'child_of', user.id)] but it gives me an error:

Error: NameError: name 'user' is not defined.


Is there any way to accomplish this?

-- 
Regards,
Andre

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe