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
|
return False
|
||||||
if not user.groups.filter(name='Treasury').exists():
|
if not user.groups.filter(name='Treasury').exists():
|
||||||
return False
|
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 True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def can_return(self, user):
|
def can_return(self, user):
|
||||||
|
if self.state != BudgetState.AWAIT_REVIEW.value:
|
||||||
|
return False
|
||||||
return self.can_endorse(user)
|
return self.can_endorse(user)
|
||||||
|
|
||||||
def can_approve(self, user):
|
def can_approve(self, user):
|
||||||
@ -183,11 +185,13 @@ class BudgetRevision(models.Model):
|
|||||||
return False
|
return False
|
||||||
if not user.groups.filter(name='Secretary').exists():
|
if not user.groups.filter(name='Secretary').exists():
|
||||||
return False
|
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 True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def can_cmtereturn(self, user):
|
def can_cmtereturn(self, user):
|
||||||
|
if self.state != BudgetState.ENDORSED.value:
|
||||||
|
return False
|
||||||
return self.can_approve(user)
|
return self.can_approve(user)
|
||||||
|
|
||||||
class ClaimState(DescriptionEnum):
|
class ClaimState(DescriptionEnum):
|
||||||
|
Loading…
Reference in New Issue
Block a user