Browse Source

[FIX] b_shift: Exemption wizard

pull/133/head
Rémy Taymans 5 years ago
parent
commit
8399d11926
  1. 4
      beesdoo_shift/wizard/temporary_exemption.py

4
beesdoo_shift/wizard/temporary_exemption.py

@ -11,9 +11,9 @@ class TemporaryExemption(models.TransientModel):
@api.multi
def exempt(self):
self = self._check() #maybe a different group
self = self._check() # maybe a different group
status_id = self.env['cooperative.status'].search([('cooperator_id', '=', self.cooperator_id.id)])
if status_id.temporary_exempt_end_date >= status_id.today:
if status_id.temporary_exempt_end_date and status_id.temporary_exempt_end_date >= status_id.today:
raise ValidationError(_("You cannot encode new temporary exemptuon since the previous one are not over yet"))
status_id.sudo().write({
'temporary_exempt_start_date': self.temporary_exempt_start_date,

Loading…
Cancel
Save