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.

1

Domain on user_id, res_users based on relation

By
ligritti
on 4/24/13, 8:23 AM 1,416 views

Hello to everybody,

I have a field, in a custom module, like: 'user_ids': fields.many2one('res.users', 'User')

I need this field contains only users belonging to a certain group, for example test, but I don't know how set the domain for this kind of relation.

anybody could help me? Thanks in advance

Simone

in action part do like this <filed name="domain">'id','=',uid</field>

Maniganda
on 4/24/13, 11:28 AM

Thanks for the anserws, i have tried but it doesn't work properly. At the moment i am looking for another way to do that.

ligritti
on 5/7/13, 7:32 AM
1
Ethan Furman
On 6/28/13, 6:03 PM

On OpenERP 7.0 (and perhaps earlier) in the ir.actions.act_window record, you want a line similar to:

<field name="domain">[('id','=',uid)]</field>

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: 4/24/13, 8:23 AM
Seen: 1416 times
Last updated: 3/16/15, 8:10 AM