Hello, i'm writing a module for OpenErp and i have some troubles with user's first and last names.
this is my piece of code:
def _user_get(self, cr, uid, context=None):
cr.execute("select id,name from resource_resource")
return cr.fetchall()
.....
_columns = {
....
'users' : fields.selection(_user_get, 'Users')
...}
But it doesn't work. Can someone help me?
It saves data in the table, but does't show user name and family. The rest info is displayed.
Thank you * Bole [1] *for your answer. I know about "'my_user':fields.many2one('res.users','User')", but the problem is that it displays too much info, such as "Language, Login and date". But i need only first and last name [1] https://www.odoo.com/forum/help-1/user/6104
o, so create a new view that shows only the fields you need .. in xml do like: that should do the trick of custom tree view fro many 2 one;) also you can define custom form view;) the same way
i have edited my answer so now you have example on how to show only the fields you want , and not all of them ;)