Skip to content

Commit

Permalink
[IMP]:Improved the fields names
Browse files Browse the repository at this point in the history
  • Loading branch information
vpratik680 committed Sep 23, 2020
1 parent 411d407 commit 77669ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions project_team/models/crm_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.""")
10 changes: 5 additions & 5 deletions project_team/models/project_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]})
4 changes: 2 additions & 2 deletions project_team/views/project_team_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</group>
<notebook>
<page name="members" string="Team Members">
<field name="team_member_ids" widget="many2many">
<field name="team_members_ids" widget="many2many">
<kanban quick_create="false" create="true" delete="true">
<field name="id"/>
<field name="name"/>
Expand Down Expand Up @@ -126,7 +126,7 @@
</field>
<page name="settings" position="after">
<page string="Team">
<field name="member_ids" widget="many2many"
<field name="members_ids" widget="many2many"
context="{'form_view_ref': 'project_team.project_team_form_view', 'default_type_team':'project'}">
<kanban quick_create="false" create="true" delete="true">
<field name="id"/>
Expand Down

0 comments on commit 77669ce

Please sign in to comment.