How define Many2many field for res.users in odoo 9.
I need select more than one user in field!
users_ids = fields.Many2many('res.users')
Try this:
users_ids = fields.Many2many('res.users', 'user_project_rel', 'user_id', 'project_id', string='Users')
<field name="users_ids" widget="many2many_tags" />
res.users - model
user_project_rel - new table
user_id - id of user in new table
project_id - id of project or any other module in new table
You can find a lot of information about fields here https://www.odoo.com/documentation/8.0/reference/orm.html
In your case, you need this.
class openerp.fields.Many2many(comodel_name=None, relation=None, column1=None, column2=None, string=None, **kwargs)
Bases: openerp.fields._RelationalMulti
Many2many field; the value of such a field is the recordset.
Parameters
The attribute comodel_name is mandatory except in the case of related fields or field extensions.
Parameters
The attributes relation, column1 and column2 are optional. If not given, names are automatically generated from model names, provided model_name and comodel_name are different!
Parameters
domain -- an optional domain to set on candidate values on the client side (domain or string)