Skip to content
Snippets Groups Projects
Commit b2d1ef3d authored by Rémi - Le Filament's avatar Rémi - Le Filament
Browse files

Update periods impact on partner

parent 5650b494
Branches
No related tags found
No related merge requests found
......@@ -64,3 +64,17 @@ class ScopPeriod(models.Model):
string="Motif Décés",
on_delete='restrict',
track_visibility='onchange')
@api.multi
def write(self, vals):
for period in self:
vals.pop('partner_id', False)
vals.pop('id_riga', False)
vals.pop('start', False)
vals.pop('end', False)
vals.pop('end_reason', False)
vals.pop('comments', False)
vals.pop('dissolution_reason_id', False)
# Update partner
period.partner_id.write(vals)
return super(ScopPeriod, self).write(vals)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment