diff --git a/project_team/models/crm_team.py b/project_team/models/crm_team.py index 738d7828b..1336a3dc5 100644 --- a/project_team/models/crm_team.py +++ b/project_team/models/crm_team.py @@ -8,8 +8,8 @@ class CrmTeamInherit(models.Model): type_team = fields.Selection([('sale', 'Sale'), ('project', 'Project')], "Type", default="sale") - team_member_ids = fields.Many2many('res.users', 'project_team_user_rel', - 'team_id', 'uid', 'Project Members', - help="""Project's members are users who + team_members_ids = fields.Many2many('res.users', 'project_team_user_rel', + 'team_id', 'user_id', 'Project Members', + help="""Project's members are users who can have an access to the tasks related to this project.""") diff --git a/project_team/models/project_team.py b/project_team/models/project_team.py index a5dd739bd..2f5c1d650 100644 --- a/project_team/models/project_team.py +++ b/project_team/models/project_team.py @@ -6,15 +6,15 @@ class ProjectProject(models.Model): _inherit = 'project.project' - member_ids = fields.Many2many('res.users', 'project_user_rel', 'project_id', - 'uid', 'Project Members', help="""Project's + members_ids = fields.Many2many('res.users', 'project_user_rel', 'project_id', + 'user_id', 'Project Members', help="""Project's members are users who can have an access to the tasks related to this project.""" - ) + ) team_id = fields.Many2one('crm.team', "Project Team", domain=[('type_team', '=', 'project')]) @api.onchange('team_id') def _get_team_members(self): - self.update({"member_ids": [(6, 0, - self.team_id.team_member_ids.ids)]}) + self.update({"members_ids": [(6, 0, + self.team_id.team_members_ids.ids)]}) diff --git a/project_team/views/project_team_view.xml b/project_team/views/project_team_view.xml index b060d14a9..9ce3727d1 100644 --- a/project_team/views/project_team_view.xml +++ b/project_team/views/project_team_view.xml @@ -29,7 +29,7 @@ - + @@ -126,7 +126,7 @@ -