Index
hypha.apply.projects.models
¶
Invoice
¶
Bases: Model
project
class-attribute
instance-attribute
¶
by
class-attribute
instance-attribute
¶
paid_value
class-attribute
instance-attribute
¶
paid_value = DecimalField(max_digits=10, decimal_places=2, validators=[MinValueValidator(Decimal('0.01'))], null=True)
document
class-attribute
instance-attribute
¶
document = FileField(upload_to=invoice_path, storage=PrivateStorage())
message_for_pm
class-attribute
instance-attribute
¶
invoice_number
class-attribute
instance-attribute
¶
invoice_amount
class-attribute
instance-attribute
¶
invoice_amount = DecimalField(max_digits=10, decimal_places=2, validators=[MinValueValidator(Decimal('0.01'))], null=True, verbose_name=gettext_lazy('Invoice amount'))
invoice_date
class-attribute
instance-attribute
¶
paid_date
class-attribute
instance-attribute
¶
status
class-attribute
instance-attribute
¶
status = FSMField(default=SUBMITTED, choices=INVOICE_STATUS_CHOICES)
deliverables
class-attribute
instance-attribute
¶
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
vendor_document_number
property
¶
Vendor document number is a required field to create invoices in IntAcct.
Formatting should be HP###### i.e. HP000001 and so on.
transition_invoice_to_resubmitted
¶
Tranistion invoice to resubmitted status. This method generally gets used on invoice edit.
Source code in hypha/apply/projects/models/payment.py
can_user_delete
¶
can_user_edit
¶
Check when an user can edit an invoice. Only applicant and staff have permission to edit invoice based on its current status.
Source code in hypha/apply/projects/models/payment.py
can_user_change_status
¶
Check user roles that can tranistion invoice status based on the current status.
Source code in hypha/apply/projects/models/payment.py
can_user_edit_deliverables
¶
Source code in hypha/apply/projects/models/payment.py
InvoiceDeliverable
¶
SupportingDocument
¶
Bases: Model
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
document
class-attribute
instance-attribute
¶
document = FileField(upload_to='supporting_documents', storage=PrivateStorage())
Contract
¶
Bases: Model
approver
class-attribute
instance-attribute
¶
project
class-attribute
instance-attribute
¶
file
class-attribute
instance-attribute
¶
file = FileField(upload_to=contract_path, storage=PrivateStorage())
signed_and_approved
class-attribute
instance-attribute
¶
signed_by_applicant
class-attribute
instance-attribute
¶
uploaded_by_contractor_at
class-attribute
instance-attribute
¶
uploaded_by_applicant_at
class-attribute
instance-attribute
¶
save
¶
ContractDocumentCategory
¶
Bases: Model
recommended_minimum
class-attribute
instance-attribute
¶
document_access_view
class-attribute
instance-attribute
¶
document_access_view = ManyToManyField(Group, limit_choices_to={'name__in': ROLES_ORG_FACULTY}, verbose_name=gettext_lazy('Allow document access for groups'), help_text=gettext_lazy("Only selected group's users can access the document"), related_name='contract_document_category', blank=True)
template
class-attribute
instance-attribute
¶
template = FileField(upload_to=contract_document_template_path, storage=PrivateStorage(), blank=True, null=True)
panels
class-attribute
instance-attribute
¶
panels = [FieldPanel('name'), FieldPanel('required'), FieldPanel('document_access_view', widget=CheckboxSelectMultiple), FieldPanel('template')]
base_form_class
class-attribute
instance-attribute
¶
base_form_class = ContractDocumentCategoryAdminForm
ContractPacketFile
¶
Bases: Model
category
class-attribute
instance-attribute
¶
category = ForeignKey('ContractDocumentCategory', null=True, on_delete=CASCADE, related_name='contract_packet_files')
project
class-attribute
instance-attribute
¶
document
class-attribute
instance-attribute
¶
document = FileField(upload_to=contract_document_path, storage=PrivateStorage())
created_at
class-attribute
instance-attribute
¶
Deliverable
¶
Bases: Model
external_id
class-attribute
instance-attribute
¶
external_id = CharField(max_length=30, blank=True, help_text='ID of this deliverable at integrated payment service.')
available_to_invoice
class-attribute
instance-attribute
¶
unit_price
class-attribute
instance-attribute
¶
unit_price = DecimalField(max_digits=10, decimal_places=2, validators=[MinValueValidator(Decimal('0.01'))])
extra_information
class-attribute
instance-attribute
¶
extra_information = JSONField(default=dict, help_text='More details of the deliverable at integrated payment service.')
DocumentCategory
¶
Bases: Model
recommended_minimum
class-attribute
instance-attribute
¶
template
class-attribute
instance-attribute
¶
template = FileField(upload_to=document_template_path, storage=PrivateStorage(), blank=True, null=True)
panels
class-attribute
instance-attribute
¶
PacketFile
¶
Bases: Model
category
class-attribute
instance-attribute
¶
category = ForeignKey('DocumentCategory', null=True, on_delete=CASCADE, related_name='packet_files')
project
class-attribute
instance-attribute
¶
document
class-attribute
instance-attribute
¶
document = FileField(upload_to=document_path, storage=PrivateStorage())
created_at
class-attribute
instance-attribute
¶
PAFApprovals
¶
Project
¶
Bases: BaseStreamForm
, AccessFormData
, Model
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
lead
class-attribute
instance-attribute
¶
submission
class-attribute
instance-attribute
¶
user
class-attribute
instance-attribute
¶
value
class-attribute
instance-attribute
¶
value = DecimalField(default=0, max_digits=20, decimal_places=2, validators=[MinValueValidator(limit_value=0)])
proposed_start
class-attribute
instance-attribute
¶
proposed_end
class-attribute
instance-attribute
¶
status
class-attribute
instance-attribute
¶
status = TextField(choices=PROJECT_STATUS_CHOICES, default=DRAFT)
form_data
class-attribute
instance-attribute
¶
form_data = JSONField(encoder=StreamFieldDataEncoder, default=dict)
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), null=True, use_json_field=True)
user_has_updated_details
class-attribute
instance-attribute
¶
submitted_contract_documents
class-attribute
instance-attribute
¶
activities
class-attribute
instance-attribute
¶
activities = GenericRelation('activity.Activity', content_type_field='source_content_type', object_id_field='source_object_id', related_query_name='project')
external_projectid
class-attribute
instance-attribute
¶
external_projectid = CharField(max_length=30, blank=True, help_text='ID of this project at integrated payment service.')
external_project_information
class-attribute
instance-attribute
¶
external_project_information = JSONField(default=dict, help_text='More details of the project integrated at payment service.')
sent_to_compliance_at
class-attribute
instance-attribute
¶
paf_reviews_meta_data
class-attribute
instance-attribute
¶
paf_reviews_meta_data = JSONField(default=dict, help_text='Reviewers role and their actions/comments')
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
can_send_for_approval
property
¶
Wrapper to expose the pending approval state
We don't want to expose a "Sent for Approval" state to the end User so we infer it from the current status being "Comitted" and the Project being locked.
program_project_id
property
¶
Program project id is used to fetch deliverables from IntAcct.
Stored in external_project_information as the first item of referenceno(PONUMBER).
stream_file
classmethod
¶
Source code in hypha/apply/funds/models/mixins.py
process_file
classmethod
¶
process_file_data
¶
Source code in hypha/apply/funds/models/mixins.py
extract_files
¶
from_db
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
deserialised_data
classmethod
¶
Source code in hypha/apply/funds/models/mixins.py
get_definitive_id
¶
field
¶
data
¶
get_serialize_multi_inputs_answer
¶
Source code in hypha/apply/funds/models/mixins.py
serialize
¶
Source code in hypha/apply/funds/models/mixins.py
get_multi_inputs_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answers
¶
render_first_group_text_answers
¶
render_text_blocks_answers
¶
Source code in hypha/apply/funds/models/mixins.py
output_answers
¶
output_text_answers
¶
output_first_group_text_answers
¶
get_answer_from_label
¶
Source code in hypha/apply/funds/models/mixins.py
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
get_form_class
¶
get_address_display
¶
create_from_submission
classmethod
¶
Create a Project from the given submission.
Returns a new Project or the given ApplicationSubmissions existing Project.
Source code in hypha/apply/projects/models/project.py
paid_value
¶
unpaid_value
¶
clean
¶
Source code in hypha/apply/projects/models/project.py
save
¶
Source code in hypha/apply/projects/models/project.py
editable_by
¶
Source code in hypha/apply/projects/models/project.py
get_absolute_url
¶
can_request_funding
¶
ProjectForm
¶
Bases: ProjectBaseStreamForm
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), use_json_field=True)
panels
class-attribute
instance-attribute
¶
from_db
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
get_form_class
¶
ProjectReminderFrequency
¶
Bases: Orderable
, ClusterableModel
page
class-attribute
instance-attribute
¶
relation
class-attribute
instance-attribute
¶
relation = CharField(max_length=2, choices=choices, default=BEFORE)
panels
class-attribute
instance-attribute
¶
panels = [FieldPanel('reminder_days', heading=gettext_lazy('Number of days')), FieldPanel('relation', heading=gettext_lazy('Relation to report due date'))]
ProjectReportForm
¶
Bases: ProjectBaseStreamForm
An Applicant Report Form can be attached to a Fund to collect reports from Applicants aka Grantees during the Project. It is only relevant for accepted or granted Submissions which is why it is attached to Project. It is similar to the other Forms (PAF, SOW) in that it uses StreamForm to allow maximum flexibility in form creation. See Also ReportVersion where the fields from the form get copied and the response data gets filled in.
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), use_json_field=True)
panels
class-attribute
instance-attribute
¶
from_db
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
get_form_class
¶
ProjectSettings
¶
Bases: BaseSiteSetting
, ClusterableModel
contracting_gp_email
class-attribute
instance-attribute
¶
finance_gp_email
class-attribute
instance-attribute
¶
staff_gp_email
class-attribute
instance-attribute
¶
paf_approval_sequential
class-attribute
instance-attribute
¶
paf_approval_sequential = BooleanField(default=True, help_text='Uncheck it to approve project parallely')
panels
class-attribute
instance-attribute
¶
panels = [FieldPanel('staff_gp_email'), FieldPanel('contracting_gp_email'), FieldPanel('finance_gp_email'), MultiFieldPanel([FieldPanel('paf_approval_sequential', heading='Approve Project Sequentially'), InlinePanel('paf_reviewers_roles', label=gettext_lazy('Project Form Reviewers Roles'))], heading=gettext_lazy('Project Reviewers Roles'), help_text=gettext_lazy("Reviewer Roles are needed to move projects to 'Internal Approval' stage. Delete all roles to skip internal approval process and to move all internal approval projects back to the 'Draft' stage with all approvals removed.")), InlinePanel('reminder_frequencies', label=gettext_lazy('Report reminder frequency'), heading=gettext_lazy('Report reminder frequency'), help_text=gettext_lazy('Set up a cron job to run `notify_report_due.py`. The script will use these reminder settings.'))]
ProjectSOWForm
¶
Bases: ProjectBaseStreamForm
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), use_json_field=True)
panels
class-attribute
instance-attribute
¶
from_db
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
get_form_class
¶
Report
¶
Bases: BaseStreamForm
, AccessFormData
, Model
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
project
class-attribute
instance-attribute
¶
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), use_json_field=True, null=True)
form_data
class-attribute
instance-attribute
¶
form_data = JSONField(encoder=StreamFieldDataEncoder, default=dict)
current
class-attribute
instance-attribute
¶
current = OneToOneField('ReportVersion', on_delete=CASCADE, related_name='live_for_report', null=True)
draft
class-attribute
instance-attribute
¶
draft = OneToOneField('ReportVersion', on_delete=CASCADE, related_name='draft_for_report', null=True)
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
stream_file
classmethod
¶
Source code in hypha/apply/funds/models/mixins.py
process_file
classmethod
¶
process_file_data
¶
Source code in hypha/apply/funds/models/mixins.py
extract_files
¶
from_db
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
deserialised_data
classmethod
¶
Source code in hypha/apply/funds/models/mixins.py
get_definitive_id
¶
field
¶
data
¶
get_serialize_multi_inputs_answer
¶
Source code in hypha/apply/funds/models/mixins.py
serialize
¶
Source code in hypha/apply/funds/models/mixins.py
get_multi_inputs_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answers
¶
render_first_group_text_answers
¶
render_text_blocks_answers
¶
Source code in hypha/apply/funds/models/mixins.py
output_answers
¶
output_text_answers
¶
output_first_group_text_answers
¶
get_answer_from_label
¶
Source code in hypha/apply/funds/models/mixins.py
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
get_form_class
¶
get_absolute_url
¶
start_date
¶
ReportConfig
¶
Bases: Model
Persists configuration about the reporting schedule etc
FREQUENCY_CHOICES
class-attribute
instance-attribute
¶
FREQUENCY_CHOICES = [(WEEK, gettext_lazy('Weeks')), (MONTH, gettext_lazy('Months')), (YEAR, gettext_lazy('Years'))]
project
class-attribute
instance-attribute
¶
frequency
class-attribute
instance-attribute
¶
frequency = CharField(choices=FREQUENCY_CHOICES, default=MONTH, max_length=6)
disable_reporting
class-attribute
instance-attribute
¶
get_frequency_display
¶
Source code in hypha/apply/projects/models/report.py
is_up_to_date
¶
outstanding_reports
¶
has_very_late_reports
¶
past_due_reports
¶
last_report
¶
Source code in hypha/apply/projects/models/report.py
current_due_report
¶
Source code in hypha/apply/projects/models/report.py
current_report
¶
This is different from current_due_report as it will return a completed report if that one is the current one.
Source code in hypha/apply/projects/models/report.py
ReportPrivateFiles
¶
Bases: Model
report
class-attribute
instance-attribute
¶
document
class-attribute
instance-attribute
¶
document = FileField(upload_to=report_path, storage=PrivateStorage())
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
ReportVersion
¶
Bases: BaseStreamForm
, AccessFormData
, Model
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
report
class-attribute
instance-attribute
¶
form_data
class-attribute
instance-attribute
¶
form_data = JSONField(encoder=StreamFieldDataEncoder, default=dict)
author
class-attribute
instance-attribute
¶
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
stream_file
classmethod
¶
Source code in hypha/apply/funds/models/mixins.py
process_file
classmethod
¶
process_file_data
¶
Source code in hypha/apply/funds/models/mixins.py
extract_files
¶
from_db
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
deserialised_data
classmethod
¶
Source code in hypha/apply/funds/models/mixins.py
get_definitive_id
¶
field
¶
data
¶
get_serialize_multi_inputs_answer
¶
Source code in hypha/apply/funds/models/mixins.py
serialize
¶
Source code in hypha/apply/funds/models/mixins.py
get_multi_inputs_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answers
¶
render_first_group_text_answers
¶
render_text_blocks_answers
¶
Source code in hypha/apply/funds/models/mixins.py
output_answers
¶
output_text_answers
¶
output_first_group_text_answers
¶
get_answer_from_label
¶
Source code in hypha/apply/funds/models/mixins.py
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|