I have the table: Employees, which contains only the field 'name' and 'login' (it's associated to the table users)
class Employees(osv.osv):
_name = 'Employees.Employees'
_columns = {
'the_name':fields.char('Name:', size = 50),
'user_id': fields.many2one('res.users', 'User:', select = True),
}
Employees()
Example:
'John' -> '[email protected]'
'Marilyn' -> '[email protected]'
Then I have the table: Tasks, which contains the fields 'name', 'description', and 'employees_id'. When a task is created it could contain several employees for the same task, that's why I choose the "many2many" because I could select several employees. So, I have tried the following:
class tasks(osv.osv):
_name = 'tasks.tasks'
_columns = {
'the_name':fields.char('Name', size = 50),
'description':fields.text('Description'),
'employees_id':fields.many2many('Employees.Employees', 'Employees', '???', 'user_id', 'All Employees')
}
tasks()
Example:
'Carry sand' -> 'Carry the whole sand from the beach' -> '[email protected]; [email protected]'
'Play' -> 'Play with legos' -> '[email protected]'
But I don't know what to put on "???"..thanks.