1
|
from wcs.qommon import _, N_
|
2
|
from wcs.qommon.storage import StorableObject
|
3
|
|
4
|
from wcs.workflows import EvolutionPart, WorkflowStatusItem, register_item_class
|
5
|
|
6
|
|
7
|
class Regie(StorableObject):
|
8
|
_names = 'regies'
|
9
|
|
10
|
|
11
|
class Invoice(StorableObject):
|
12
|
_names = 'invoices'
|
13
|
|
14
|
|
15
|
class InvoiceEvolutionPart(EvolutionPart):
|
16
|
pass
|
17
|
|
18
|
|
19
|
class Transaction(StorableObject):
|
20
|
_names = 'transactions'
|
21
|
|
22
|
|
23
|
class PaymentWorkflowStatusItem(WorkflowStatusItem):
|
24
|
description = N_('Payment Creation')
|
25
|
key = 'payment'
|
26
|
endpoint = False
|
27
|
category = 'interaction'
|
28
|
|
29
|
@classmethod
|
30
|
def is_available(self, workflow=None):
|
31
|
return False
|
32
|
|
33
|
def render_as_line(self):
|
34
|
return _('Payable (obsolete)')
|
35
|
|
36
|
def get_parameters(self):
|
37
|
return ()
|
38
|
|
39
|
def perform(self, formdata):
|
40
|
pass
|
41
|
|
42
|
|
43
|
register_item_class(PaymentWorkflowStatusItem)
|
44
|
|
45
|
|
46
|
class PaymentCancelWorkflowStatusItem(WorkflowStatusItem):
|
47
|
description = N_('Payment Cancel')
|
48
|
key = 'payment-cancel'
|
49
|
endpoint = False
|
50
|
category = 'interaction'
|
51
|
|
52
|
@classmethod
|
53
|
def is_available(self, workflow=None):
|
54
|
return False
|
55
|
|
56
|
def render_as_line(self):
|
57
|
return _('Cancel Payments (obsolete)')
|
58
|
|
59
|
def get_parameters(self):
|
60
|
return ()
|
61
|
|
62
|
def perform(self, formdata):
|
63
|
pass
|
64
|
|
65
|
|
66
|
register_item_class(PaymentCancelWorkflowStatusItem)
|
67
|
|
68
|
|
69
|
class PaymentValidationWorkflowStatusItem(WorkflowStatusItem):
|
70
|
description = N_('Payment Validation')
|
71
|
key = 'payment-validation'
|
72
|
endpoint = False
|
73
|
category = 'interaction'
|
74
|
|
75
|
@classmethod
|
76
|
def is_available(self, workflow=None):
|
77
|
return False
|
78
|
|
79
|
def render_as_line(self):
|
80
|
return _('Wait for payment validation (obsolete)')
|
81
|
|
82
|
def get_parameters(self):
|
83
|
return ()
|
84
|
|
85
|
def perform(self, formdata):
|
86
|
pass
|
87
|
|
88
|
|
89
|
register_item_class(PaymentValidationWorkflowStatusItem)
|