Merge branch 'pawan_branch' into 'development'

added from subproject to parent project

See merge request prakash.jain/cor-odoo!135
This commit is contained in:
pawan.sharma 2021-02-24 23:21:08 -08:00
commit 5a227cfdd5
1 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,11 @@ class SubProject(models.Model):
@api.onchange('parent_project', 'sub_project')
def onchange_parent_project_sub_project(self):
user_list = []
if self.parent_project.sub_project:
user_list = self.parent_project.sub_project.ids
user_list.append(self._origin.id)
self.parent_project.sub_project = user_list
if self.sub_project:
for rec in self.sub_project:
#print('AAAAAAAAAAA', rec, rec._origin.id)
@ -22,6 +27,7 @@ class SubProject(models.Model):
class InheritProjectTask(models.Model):
_inherit = 'project.task'