Community mailing list archives

community@mail.odoo.com

Re: domain filter

by
Skillteam, Houssine BAKKALI
- 11/17/2015 11:36:32

Check if child_of operator goes with a list. And if your model have a parent_id field.

Le 17 nov. 2015 14:13, "Tibyan Hussien" <tibyan.hussien@visionvalley.net> a écrit :

Salam Community

I want to create a rule that a login user who belongs to a branch, can only see the projects of his branch. I used below domain filter

  <field name="domain_force">['|',('branch_id','=',False),('branch_id','child_of',[user.branch_id.id])]</field>

 But I got an error of

ValueError: Invalid field 'parent_id' in leaf "<osv.ExtendedLeaf: ('parent_id', 'in', [1]) on res_branch (ctx: )>"
 

Tibyan

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