Skip to content
Snippets Groups Projects
Commit e8976b9e authored by Juliana's avatar Juliana
Browse files

Ajout partner automatique en fonction du code UR

parent acad08d3
Branches
No related tags found
No related merge requests found
...@@ -53,6 +53,13 @@ class CGScopCalendar(models.Model): ...@@ -53,6 +53,13 @@ class CGScopCalendar(models.Model):
# ------------------------------------------------------ # ------------------------------------------------------
# onchange # onchange
# ------------------------------------------------------ # ------------------------------------------------------
@api.onchange('project_id')
def _onchange_project_id(self):
if self.project_id.partner_id:
self.coop_id = self.project_id.partner_id
else:
self.coop_id = False
@api.onchange('coop_id') @api.onchange('coop_id')
def _onchange_coop_id(self): def _onchange_coop_id(self):
address = '' address = ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment