Allow Treasurer/Secretary to skip steps
This commit is contained in:
parent
a9021faedc
commit
4e1e9a611e
@ -171,11 +171,13 @@ class BudgetRevision(models.Model):
|
||||
return False
|
||||
if not user.groups.filter(name='Treasury').exists():
|
||||
return False
|
||||
if self.state == BudgetState.AWAIT_REVIEW.value:
|
||||
if self.state == BudgetState.AWAIT_REVIEW.value or self.state == BudgetState.DRAFT.value or self.state == BudgetState.RESUBMIT.value:
|
||||
return True
|
||||
return False
|
||||
|
||||
def can_return(self, user):
|
||||
if self.state != BudgetState.AWAIT_REVIEW.value:
|
||||
return False
|
||||
return self.can_endorse(user)
|
||||
|
||||
def can_approve(self, user):
|
||||
@ -183,11 +185,13 @@ class BudgetRevision(models.Model):
|
||||
return False
|
||||
if not user.groups.filter(name='Secretary').exists():
|
||||
return False
|
||||
if self.state == BudgetState.ENDORSED.value:
|
||||
if self.state == BudgetState.ENDORSED.value or self.state == BudgetState.AWAIT_REVIEW.value or self.state == BudgetState.DRAFT.value or self.state == BudgetState.RESUBMIT.value:
|
||||
return True
|
||||
return False
|
||||
|
||||
def can_cmtereturn(self, user):
|
||||
if self.state != BudgetState.ENDORSED.value:
|
||||
return False
|
||||
return self.can_approve(user)
|
||||
|
||||
class ClaimState(DescriptionEnum):
|
||||
|
Loading…
Reference in New Issue
Block a user