diff --git a/contracts/forms.py b/contracts/forms.py index 350a9ba6369c23c2a7795bcdc44e23acd46c4012..bb3f457964809ba5f581d792b07e72418ed51735 100644 --- a/contracts/forms.py +++ b/contracts/forms.py @@ -87,6 +87,21 @@ class ContractAdminForm(forms.ModelForm): ) continue + + # Allow people with approve permissions to mark contracts as TO_BE_APPROVED + if ( + self.instance.status == Contract.StatusTypes.WORK_IN_PROGRESS + and choice_key == Contract.StatusTypes.TO_BE_APPROVED + and self.current_user.has_perm("contracts.approve") + ): + allowed_choices.append( + ( + choice_key, + choice_label, + ) + ) + + continue if self.instance.status == choice_key: allowed_choices.append(