hide payment workflow items if payment is disabled (fix #1779)
This commit is contained in:
parent
830bbecc65
commit
54a05fc551
|
@ -191,6 +191,10 @@ class PaymentWorkflowStatusItem(WorkflowStatusItem):
|
|||
next_status = None
|
||||
request_kwargs = {}
|
||||
|
||||
def is_available(self):
|
||||
return is_payment_supported()
|
||||
is_available = classmethod(is_available)
|
||||
|
||||
def render_as_line(self):
|
||||
if self.regie_id:
|
||||
return _('Payable to %s' % Regie.get(self.regie_id).label)
|
||||
|
@ -272,6 +276,10 @@ class PaymentCancelWorkflowStatusItem(WorkflowStatusItem):
|
|||
reason = None
|
||||
regie_id = None
|
||||
|
||||
def is_available(self):
|
||||
return is_payment_supported()
|
||||
is_available = classmethod(is_available)
|
||||
|
||||
def render_as_line(self):
|
||||
if self.regie_id:
|
||||
if self.regie_id == '_all':
|
||||
|
@ -397,6 +405,10 @@ class PaymentValidationWorkflowStatusItem(WorkflowStatusItem):
|
|||
|
||||
next_status = None
|
||||
|
||||
def is_available(self):
|
||||
return is_payment_supported()
|
||||
is_available = classmethod(is_available)
|
||||
|
||||
def render_as_line(self):
|
||||
return _('Wait for payment validation')
|
||||
|
||||
|
|
Reference in New Issue