Commit 5bf8985b by root

Fix 'display_standard_points' key error

parent 7143b801
......@@ -39,7 +39,10 @@ class ResPartner(models.Model):
if new_values['cooperative_state'] == "unsubscribed":
new_values['makeups_to_do'] = 2 if absence_status == 'absent' else 1
new_values['final_' + p.shift_type + '_point'] = -2
new_values['display_' + p.shift_type + '_points'] = -2
if p.shift_type == 'standard':
new_values['display_std_points'] = -2
else:
new_values['display_ftop_points'] = -2
"""
unlink model: "shift.template.registration"
to delete all future shifts linked to this coop.
......@@ -47,6 +50,7 @@ class ResPartner(models.Model):
for streg in self.env['shift.template.registration']\
.search([('partner_id', '=', p.id)]):
streg.unlink()
mail_template = self.env.ref('coop_membership.unsubscribe_email')
if mail_template:
mail_template.send_mail(p.id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment