endi.views package¶
Subpackages¶
- endi.views.accompagnement package
- Submodules
- endi.views.accompagnement.activity module
ActivityEditViewActivityEditView.add_template_varsActivityEditView.before()ActivityEditView.dbsessionActivityEditView.get_appstruct()ActivityEditView.next_activity_formActivityEditView.record_formActivityEditView.requestActivityEditView.schemaActivityEditView.sessionActivityEditView.submit_success()ActivityEditView.title
ActivityListActivityList.dbsessionActivityList.default_directionActivityList.default_sortActivityList.filter_conseiller()ActivityList.filter_date()ActivityList.filter_participant()ActivityList.filter_status()ActivityList.filter_type()ActivityList.filter_user_status()ActivityList.query()ActivityList.requestActivityList.schemaActivityList.sessionActivityList.sort_columnsActivityList.title
ActivityRecordViewActivityRecordView.add_template_varsActivityRecordView.buttonsActivityRecordView.closed_success()ActivityRecordView.dbsessionActivityRecordView.pdf_success()ActivityRecordView.record_attendance()ActivityRecordView.record_success()ActivityRecordView.requestActivityRecordView.schemaActivityRecordView.session
ActivityReportOdsViewActivityReportXlsViewCompanyActivityListViewNewActivityAjaxViewNewActivityViewUserActivityListViewactivity_delete_view()activity_html_view()activity_pdf_dev_view()activity_pdf_view()activity_view_only_view()add_routes()add_views()handle_rel_in_appstruct()includeme()new_activity()populate_actionmenu()record_changes()register_menus()
- Module contents
- endi.views.accounting package
- Submodules
- endi.views.accounting.balance_sheet_measures module
BalanceSheetGridComputeCompanyBalanceSheetMeasuresListViewCompanyBalanceSheetMeasuresListView.add_template_varsCompanyBalanceSheetMeasuresListView.current_gridCompanyBalanceSheetMeasuresListView.dbsessionCompanyBalanceSheetMeasuresListView.filter_button_cssCompanyBalanceSheetMeasuresListView.filter_button_iconCompanyBalanceSheetMeasuresListView.filter_button_labelCompanyBalanceSheetMeasuresListView.filter_year()CompanyBalanceSheetMeasuresListView.get_company_id()CompanyBalanceSheetMeasuresListView.info_msgCompanyBalanceSheetMeasuresListView.last_gridCompanyBalanceSheetMeasuresListView.query()CompanyBalanceSheetMeasuresListView.requestCompanyBalanceSheetMeasuresListView.schemaCompanyBalanceSheetMeasuresListView.sessionCompanyBalanceSheetMeasuresListView.titleCompanyBalanceSheetMeasuresListView.use_paginateCompanyBalanceSheetMeasuresListView.year
includeme()
- endi.views.accounting.bank_remittances module
BankRemittanceCloseViewBankRemittanceCsvView()BankRemittanceListViewBankRemittanceListView.dbsessionBankRemittanceListView.default_directionBankRemittanceListView.default_sortBankRemittanceListView.filter_bank()BankRemittanceListView.filter_closed()BankRemittanceListView.filter_payment_mode()BankRemittanceListView.filter_remittance_id()BankRemittanceListView.query()BankRemittanceListView.requestBankRemittanceListView.schemaBankRemittanceListView.sessionBankRemittanceListView.sort_columnsBankRemittanceListView.title
BankRemittanceOpenViewBankRemittancePdfView()BankRemittanceViewBankRemittanceView.add_template_varsBankRemittanceView.dbsessionBankRemittanceView.default_directionBankRemittanceView.default_sortBankRemittanceView.populate_actionmenu()BankRemittanceView.query()BankRemittanceView.requestBankRemittanceView.sessionBankRemittanceView.stream_main_actions()BankRemittanceView.title
includeme()
- endi.views.accounting.company_general_ledger module
CompanyGeneralLedgerOperationsListToolsCompanyGeneralLedgerOperationsListTools.default_directionCompanyGeneralLedgerOperationsListTools.default_sortCompanyGeneralLedgerOperationsListTools.filter_cae_config_general_account()CompanyGeneralLedgerOperationsListTools.filter_credit()CompanyGeneralLedgerOperationsListTools.filter_date()CompanyGeneralLedgerOperationsListTools.filter_debit()CompanyGeneralLedgerOperationsListTools.filter_general_account()CompanyGeneralLedgerOperationsListTools.get_wording_dict()CompanyGeneralLedgerOperationsListTools.query()CompanyGeneralLedgerOperationsListTools.schemaCompanyGeneralLedgerOperationsListTools.sort_columnsCompanyGeneralLedgerOperationsListTools.title
CompanyGeneralLedgerOperationsListViewincludeme()
- endi.views.accounting.income_statement_measures module
- endi.views.accounting.operations module
- endi.views.accounting.rest_api module
AccountingOperationRestViewAccountingOperationRestView.bulk_post()AccountingOperationRestView.collection_delete()AccountingOperationRestView.collection_get()AccountingOperationRestView.dbsessionAccountingOperationRestView.encodingsAccountingOperationRestView.post_format()AccountingOperationRestView.requestAccountingOperationRestView.schemaAccountingOperationRestView.session
authentification_check_view()includeme()
- endi.views.accounting.routes module
- endi.views.accounting.treasury_measures module
CompanyTreasuryMeasuresListViewCompanyTreasuryMeasuresListView.add_template_varsCompanyTreasuryMeasuresListView.current_gridCompanyTreasuryMeasuresListView.dbsessionCompanyTreasuryMeasuresListView.default_directionCompanyTreasuryMeasuresListView.default_sortCompanyTreasuryMeasuresListView.filter_year()CompanyTreasuryMeasuresListView.get_company_id()CompanyTreasuryMeasuresListView.highlight_entryCompanyTreasuryMeasuresListView.info_msgCompanyTreasuryMeasuresListView.last_gridCompanyTreasuryMeasuresListView.query()CompanyTreasuryMeasuresListView.requestCompanyTreasuryMeasuresListView.schemaCompanyTreasuryMeasuresListView.sessionCompanyTreasuryMeasuresListView.sort_columnsCompanyTreasuryMeasuresListView.stream_actions()CompanyTreasuryMeasuresListView.title
TreasuryGridComputeTreasuryGridListViewTreasuryGridListView.add_template_varsTreasuryGridListView.dbsessionTreasuryGridListView.default_directionTreasuryGridListView.default_sortTreasuryGridListView.filter_company_id()TreasuryGridListView.highlight_entryTreasuryGridListView.populate_actionmenu()TreasuryGridListView.query()TreasuryGridListView.requestTreasuryGridListView.schemaTreasuryGridListView.sessionTreasuryGridListView.sort_by_company()TreasuryGridListView.sort_columnsTreasuryGridListView.stream_actions()TreasuryGridListView.title
includeme()
- Module contents
- endi.views.admin package
- Subpackages
- endi.views.admin.accompagnement package
- endi.views.admin.accounting package
- Submodules
- endi.views.admin.accounting.accounting_closure module
- endi.views.admin.accounting.accounting_software module
- endi.views.admin.accounting.balance_sheet_measures module
- endi.views.admin.accounting.company_general_ledger module
- endi.views.admin.accounting.income_statement_measures module
- endi.views.admin.accounting.index module
- endi.views.admin.accounting.treasury_measures module
- Module contents
- endi.views.admin.expense package
- endi.views.admin.main package
- endi.views.admin.sale package
- endi.views.admin.supplier package
- endi.views.admin.userdatas package
- Submodules
- endi.views.admin.layout module
- endi.views.admin.tools module
AdminCrudListViewAdminCrudListView.childrenAdminCrudListView.columnsAdminCrudListView.get_actions()AdminCrudListView.get_addurl()AdminCrudListView.get_icon()AdminCrudListView.load_items()AdminCrudListView.more_template_vars()AdminCrudListView.stream_actions()AdminCrudListView.stream_columns()AdminCrudListView.title
AdminOptionAdminOption.before()AdminOption.childrenAdminOption.customize_schema()AdminOption.dbsessionAdminOption.disableAdminOption.factoryAdminOption.get_appstruct()AdminOption.js_resourcesAdminOption.messageAdminOption.query_items()AdminOption.requestAdminOption.schemaAdminOption.sessionAdminOption.submit_success()AdminOption.titleAdminOption.validation_msgAdminOption.widget_options
BaseAdminAddViewBaseAdminDeleteViewBaseAdminDisableViewBaseAdminEditViewBaseAdminFormViewBaseAdminIndexViewBaseConfigViewget_model_admin_view()make_enter_point_view()
- Module contents
- Subpackages
- endi.views.business package
- Submodules
- endi.views.business.business module
BusinessEditViewBusinessOverviewViewBusinessOverviewView.childrenBusinessOverviewView.current()BusinessOverviewView.estimation_add_link()BusinessOverviewView.estimation_add_url()BusinessOverviewView.invoicing_links()BusinessOverviewView.route_nameBusinessOverviewView.switch_invoicing_mode_link()BusinessOverviewView.titleBusinessOverviewView.tree_is_visibleBusinessOverviewView.tree_url
BusinessProgressInvoicingAddViewBusinessSwitchInvoicingModeViewbusiness_entry_point_view()close_business_view()get_invoicing_links()includeme()invoice_all_url()progress_invoicing_url()
- endi.views.business.estimation module
BusinessEstimationListBusinessEstimationList.add_template_varsBusinessEstimationList.add_urlBusinessEstimationList.childrenBusinessEstimationList.dbsessionBusinessEstimationList.filter_business()BusinessEstimationList.requestBusinessEstimationList.route_nameBusinessEstimationList.schemaBusinessEstimationList.sessionBusinessEstimationList.title
add_estimation_view()includeme()
- endi.views.business.expense module
- endi.views.business.files module
- endi.views.business.invoice module
- endi.views.business.layout module
- endi.views.business.lists module
BusinessListToolsBusinessListTools.filter_bpf_filled()BusinessListTools.filter_business_type_id()BusinessListTools.filter_company_id()BusinessListTools.filter_customer_id()BusinessListTools.filter_include_closed()BusinessListTools.filter_invoicing_year()BusinessListTools.filter_search()BusinessListTools.query()BusinessListTools.schema
GlobalBusinessListViewincludeme()
- endi.views.business.py3o module
- endi.views.business.rest_api module
- endi.views.business.routes module
- Module contents
- endi.views.company package
- Submodules
- endi.views.company.lists module
CompanyListCompanyList.add_template_varsCompanyList.dbsessionCompanyList.default_directionCompanyList.default_sortCompanyList.filter_include_inactive()CompanyList.filter_include_internal()CompanyList.filter_search()CompanyList.query()CompanyList.requestCompanyList.schemaCompanyList.sessionCompanyList.sort_columnsCompanyList.stream_actions()CompanyList.title
includeme()
- endi.views.company.rest_api module
- endi.views.company.routes module
- endi.views.company.tools module
- endi.views.company.views module
- Module contents
- endi.views.estimations package
- Submodules
- endi.views.estimations.estimation module
EstimationAddViewEstimationAdminViewEstimationAttachInvoiceViewEstimationAttachInvoiceView.before()EstimationAttachInvoiceView.buttonsEstimationAttachInvoiceView.cancel_failure()EstimationAttachInvoiceView.cancel_success()EstimationAttachInvoiceView.dbsessionEstimationAttachInvoiceView.redirect()EstimationAttachInvoiceView.requestEstimationAttachInvoiceView.schemaEstimationAttachInvoiceView.sessionEstimationAttachInvoiceView.submit_success()
EstimationDuplicateViewEstimationEditViewEstimationFilesViewEstimationGeneralViewEstimationPdfViewEstimationPreviewViewEstimationSetMetadatasViewadd_routes()estimation_genbusiness_view()estimation_geninv_view()includeme()
- endi.views.estimations.lists module
CompanyEstimationListGlobalEstimationListGlobalEstimationList.add_template_varsGlobalEstimationList.dbsessionGlobalEstimationList.default_directionGlobalEstimationList.default_sortGlobalEstimationList.filter_auto_validated()GlobalEstimationList.filter_business_type_id()GlobalEstimationList.filter_company()GlobalEstimationList.filter_customer()GlobalEstimationList.filter_date()GlobalEstimationList.filter_doctype()GlobalEstimationList.filter_internal_number()GlobalEstimationList.filter_signed_status()GlobalEstimationList.filter_status()GlobalEstimationList.filter_ttc()GlobalEstimationList.is_adminGlobalEstimationList.main_actionsGlobalEstimationList.more_actionsGlobalEstimationList.more_template_vars()GlobalEstimationList.query()GlobalEstimationList.requestGlobalEstimationList.schemaGlobalEstimationList.sessionGlobalEstimationList.sort_columnsGlobalEstimationList.stream_actions()GlobalEstimationList.titleGlobalEstimationList.with_draft
add_views()includeme()
- endi.views.estimations.rest_api module
- endi.views.estimations.routes module
- Module contents
- endi.views.expenses package
- Submodules
- endi.views.expenses.bookmarks module
- endi.views.expenses.expense module
ExpenseSheetAddViewExpenseSheetAddView.before()ExpenseSheetAddView.create_instance()ExpenseSheetAddView.dbsessionExpenseSheetAddView.redirect()ExpenseSheetAddView.requestExpenseSheetAddView.schemaExpenseSheetAddView.sessionExpenseSheetAddView.submit_failure()ExpenseSheetAddView.submit_success()ExpenseSheetAddView.title
ExpenseSheetDeleteViewExpenseSheetDuplicateViewExpenseSheetDuplicateView.before()ExpenseSheetDuplicateView.dbsessionExpenseSheetDuplicateView.form_optionsExpenseSheetDuplicateView.redirect()ExpenseSheetDuplicateView.requestExpenseSheetDuplicateView.schemaExpenseSheetDuplicateView.sessionExpenseSheetDuplicateView.submit_failure()ExpenseSheetDuplicateView.submit_success()ExpenseSheetDuplicateView.title
ExpenseSheetEditInfosViewExpenseSheetEditInfosView.before()ExpenseSheetEditInfosView.dbsessionExpenseSheetEditInfosView.redirect()ExpenseSheetEditInfosView.requestExpenseSheetEditInfosView.schemaExpenseSheetEditInfosView.sessionExpenseSheetEditInfosView.submit_failure()ExpenseSheetEditInfosView.submit_success()ExpenseSheetEditInfosView.title
ExpenseSheetEditViewadd_routes()excel_filename()get_expense_sheet()get_formatted_user_vehicle_information_sentence()get_new_expense_sheet()get_redirect_btn()includeme()populate_actionmenu()
- endi.views.expenses.lists module
- endi.views.expenses.rest_api module
- endi.views.expenses.utils module
- Module contents
- endi.views.export package
- Submodules
- endi.views.export.bpf module
- endi.views.export.expense module
SageExpenseExportPageSageExpenseExportPage.before()SageExpenseExportPage.check()SageExpenseExportPage.config_keysSageExpenseExportPage.dbsessionSageExpenseExportPage.get_filename()SageExpenseExportPage.get_forms()SageExpenseExportPage.query()SageExpenseExportPage.record_export()SageExpenseExportPage.record_exported()SageExpenseExportPage.requestSageExpenseExportPage.sessionSageExpenseExportPage.titleSageExpenseExportPage.writer_interface
add_routes()add_views()includeme()
- endi.views.export.expense_payment module
ExpensePaymentExportPageSingleExpensePaymentExportPageSingleExpensePaymentExportPage.admin_route_nameSingleExpensePaymentExportPage.before()SingleExpensePaymentExportPage.check()SingleExpensePaymentExportPage.dbsessionSingleExpensePaymentExportPage.get_filename()SingleExpensePaymentExportPage.query()SingleExpensePaymentExportPage.record_export()SingleExpensePaymentExportPage.record_exported()SingleExpensePaymentExportPage.requestSingleExpensePaymentExportPage.sessionSingleExpensePaymentExportPage.titleSingleExpensePaymentExportPage.validate_form()SingleExpensePaymentExportPage.writer_interface
add_routes()add_views()includeme()
- endi.views.export.invoice module
SageInvoiceExportPageSageInvoiceExportPage.check_num_invoices()SageInvoiceExportPage.dbsessionSageInvoiceExportPage.get_forms()SageInvoiceExportPage.populate_action_menu()SageInvoiceExportPage.query()SageInvoiceExportPage.requestSageInvoiceExportPage.sessionSageInvoiceExportPage.titleSageInvoiceExportPage.validate_form()
SageSingleInvoiceExportPageSageSingleInvoiceExportPage.admin_route_nameSageSingleInvoiceExportPage.before()SageSingleInvoiceExportPage.check()SageSingleInvoiceExportPage.check_num_invoices()SageSingleInvoiceExportPage.dbsessionSageSingleInvoiceExportPage.get_filename()SageSingleInvoiceExportPage.populate_action_menu()SageSingleInvoiceExportPage.query()SageSingleInvoiceExportPage.record_export()SageSingleInvoiceExportPage.record_exported()SageSingleInvoiceExportPage.requestSageSingleInvoiceExportPage.sessionSageSingleInvoiceExportPage.titleSageSingleInvoiceExportPage.validate_form()SageSingleInvoiceExportPage.writer_interface
add_routes()add_views()includeme()
- endi.views.export.log_list module
BaseExportLogListViewBaseExportLogListView.dbsessionBaseExportLogListView.default_directionBaseExportLogListView.default_sortBaseExportLogListView.filter_date()BaseExportLogListView.filter_export_type()BaseExportLogListView.filter_user_id()BaseExportLogListView.query()BaseExportLogListView.requestBaseExportLogListView.schemaBaseExportLogListView.sessionBaseExportLogListView.sort_columnsBaseExportLogListView.title
includeme()
- endi.views.export.payment module
PaymentExportPageSinglePaymentExportPageSinglePaymentExportPage.admin_route_nameSinglePaymentExportPage.before()SinglePaymentExportPage.check()SinglePaymentExportPage.dbsessionSinglePaymentExportPage.get_filename()SinglePaymentExportPage.query()SinglePaymentExportPage.record_export()SinglePaymentExportPage.record_exported()SinglePaymentExportPage.requestSinglePaymentExportPage.sessionSinglePaymentExportPage.titleSinglePaymentExportPage.validate_form()SinglePaymentExportPage.writer_interface
add_routes()add_views()includeme()
- endi.views.export.routes module
- endi.views.export.supplier_invoice module
SageSupplierInvoiceExportPageSageSupplierInvoiceExportPage.before()SageSupplierInvoiceExportPage.check()SageSupplierInvoiceExportPage.config_keysSageSupplierInvoiceExportPage.dbsessionSageSupplierInvoiceExportPage.get_filename()SageSupplierInvoiceExportPage.get_forms()SageSupplierInvoiceExportPage.query()SageSupplierInvoiceExportPage.record_export()SageSupplierInvoiceExportPage.record_exported()SageSupplierInvoiceExportPage.requestSageSupplierInvoiceExportPage.sessionSageSupplierInvoiceExportPage.titleSageSupplierInvoiceExportPage.writer_interface
add_routes()add_views()includeme()
- endi.views.export.supplier_payment module
SingleSupplierPaymentExportPageSingleSupplierPaymentExportPage.before()SingleSupplierPaymentExportPage.check()SingleSupplierPaymentExportPage.dbsessionSingleSupplierPaymentExportPage.get_filename()SingleSupplierPaymentExportPage.query()SingleSupplierPaymentExportPage.record_export()SingleSupplierPaymentExportPage.record_exported()SingleSupplierPaymentExportPage.requestSingleSupplierPaymentExportPage.sessionSingleSupplierPaymentExportPage.validate_form()SingleSupplierPaymentExportPage.writer_interface
SupplierPaymentExportPageadd_routes()add_views()includeme()
- endi.views.export.utils module
find_task_status_date()format_export_type()get_bpf_year_form()get_expense_all_form()get_expense_form()get_expense_number_form()get_expense_payment_all_form()get_expense_payment_period_form()get_invoice_all_form()get_invoice_number_form()get_invoice_period_form()get_payment_all_form()get_payment_period_form()get_supplier_invoice_all_form()get_supplier_invoice_form()get_supplier_invoice_number_form()get_supplier_invoice_period_form()get_supplier_payment_all_form()get_supplier_payment_number_form()get_supplier_payment_period_form()query_invoices_for_export()
- Module contents
BaseExportViewBaseExportView.admin_route_nameBaseExportView.before()BaseExportView.check()BaseExportView.dbsessionBaseExportView.get_filename()BaseExportView.get_forms()BaseExportView.get_preview_items()BaseExportView.get_writer()BaseExportView.help_messageBaseExportView.produce_file_and_record()BaseExportView.query()BaseExportView.record_export()BaseExportView.record_exported()BaseExportView.requestBaseExportView.sessionBaseExportView.validate_form()BaseExportView.write_file()BaseExportView.writer_interface
get_value_from_writer()
- endi.views.files package
- Submodules
- endi.views.files.rest_api module
- endi.views.files.routes module
- endi.views.files.views module
- Module contents
- endi.views.internal_invoicing package
- endi.views.invoices package
- Submodules
- endi.views.invoices.cancelinvoice module
CancelInvoiceAccountingViewCancelInvoiceAdminViewCancelInvoiceDeleteViewCancelInvoiceEditViewCancelInvoiceFilesViewCancelInvoiceGeneralViewCancelInvoicePdfViewCancelInvoicePreviewViewCancelInvoiceSetMetadatasViewCancelInvoiceSetProductsViewCancelInvoiceSetTreasuryiewadd_routes()get_title()includeme()
- endi.views.invoices.invoice module
InvoiceAccountingViewInvoiceAddViewInvoiceAdminViewInvoiceAttachEstimationViewInvoiceAttachEstimationView.before()InvoiceAttachEstimationView.buttonsInvoiceAttachEstimationView.cancel_failure()InvoiceAttachEstimationView.cancel_success()InvoiceAttachEstimationView.dbsessionInvoiceAttachEstimationView.redirect()InvoiceAttachEstimationView.requestInvoiceAttachEstimationView.schemaInvoiceAttachEstimationView.sessionInvoiceAttachEstimationView.submit_success()
InvoiceDeleteViewInvoiceDuplicateViewInvoiceEditViewInvoiceFilesViewInvoiceGeneralViewInvoicePaymentViewInvoicePdfViewInvoicePreviewViewInvoiceSetMetadatasViewInvoiceSetProductsViewInvoiceSetTreasuryiewadd_routes()gencinv_view()get_title()includeme()
- endi.views.invoices.lists module
- endi.views.invoices.rest_api module
- endi.views.invoices.routes module
- Module contents
- endi.views.management package
- Submodules
- endi.views.management.companies module
CompaniesManagementOdsViewCompaniesManagementViewCompaniesManagementView.compute_aggregate_datas()CompaniesManagementView.compute_companies_datas()CompaniesManagementView.dbsessionCompaniesManagementView.filter_active()CompaniesManagementView.filter_activity_id()CompaniesManagementView.filter_antenne_id()CompaniesManagementView.filter_follower_id()CompaniesManagementView.filter_internal()CompaniesManagementView.get_exercice_data()CompaniesManagementView.query()CompaniesManagementView.requestCompaniesManagementView.schemaCompaniesManagementView.sessionCompaniesManagementView.titleCompaniesManagementView.use_paginate
CompaniesManagementXlsViewincludeme()
- endi.views.management.kms module
KmsManagementOdsViewKmsManagementViewKmsManagementView.compute_aggregate_data()KmsManagementView.compute_kms_data()KmsManagementView.dbsessionKmsManagementView.get_months()KmsManagementView.get_user_month_kms_data()KmsManagementView.get_users_with_kms()KmsManagementView.get_year()KmsManagementView.query()KmsManagementView.requestKmsManagementView.schemaKmsManagementView.sessionKmsManagementView.sort_columnsKmsManagementView.titleKmsManagementView.use_paginate
KmsManagementXlsViewincludeme()
- endi.views.management.payments module
PaymentsManagementOdsViewPaymentsManagementViewPaymentsManagementView.dbsessionPaymentsManagementView.default_sortPaymentsManagementView.filter_button_cssPaymentsManagementView.filter_button_iconPaymentsManagementView.filter_button_labelPaymentsManagementView.filter_month()PaymentsManagementView.filter_period()PaymentsManagementView.filter_year()PaymentsManagementView.more_template_vars()PaymentsManagementView.query()PaymentsManagementView.requestPaymentsManagementView.schemaPaymentsManagementView.sessionPaymentsManagementView.sort_columnsPaymentsManagementView.titlePaymentsManagementView.use_paginate
PaymentsManagementXlsViewincludeme()
- Module contents
- endi.views.price_study package
- Submodules
- endi.views.price_study.rest_api module
RestPriceStudyChapterViewRestPriceStudyDiscountViewRestPriceStudyDiscountView.after_flush()RestPriceStudyDiscountView.collection_get()RestPriceStudyDiscountView.dbsessionRestPriceStudyDiscountView.get_schema()RestPriceStudyDiscountView.on_delete()RestPriceStudyDiscountView.post_format()RestPriceStudyDiscountView.requestRestPriceStudyDiscountView.session
RestPriceStudyProductViewRestPriceStudyProductView.after_flush()RestPriceStudyProductView.collection_get()RestPriceStudyProductView.dbsessionRestPriceStudyProductView.duplicate_view()RestPriceStudyProductView.get_schema()RestPriceStudyProductView.load_from_catalog_view()RestPriceStudyProductView.on_delete()RestPriceStudyProductView.post_format()RestPriceStudyProductView.requestRestPriceStudyProductView.session
RestPriceStudyViewRestWorkItemViewRestWorkItemView.after_flush()RestWorkItemView.collection_get()RestWorkItemView.dbsessionRestWorkItemView.duplicate_view()RestWorkItemView.get_schema()RestWorkItemView.load_from_catalog_view()RestWorkItemView.on_delete()RestWorkItemView.post_format()RestWorkItemView.requestRestWorkItemView.session
includeme()
- endi.views.price_study.routes module
- endi.views.price_study.utils module
- Module contents
- endi.views.progress_invoicing package
- Submodules
- endi.views.progress_invoicing.rest_api module
ProgressInvoicingChapterRestViewProgressInvoicingChapterRestView.collection_get()ProgressInvoicingChapterRestView.dbsessionProgressInvoicingChapterRestView.delete()ProgressInvoicingChapterRestView.item_routeProgressInvoicingChapterRestView.post()ProgressInvoicingChapterRestView.put()ProgressInvoicingChapterRestView.requestProgressInvoicingChapterRestView.routeProgressInvoicingChapterRestView.session
ProgressInvoicingPlanRestViewProgressInvoicingPlanRestView.dbsessionProgressInvoicingPlanRestView.delete()ProgressInvoicingPlanRestView.item_routeProgressInvoicingPlanRestView.post()ProgressInvoicingPlanRestView.put()ProgressInvoicingPlanRestView.requestProgressInvoicingPlanRestView.routeProgressInvoicingPlanRestView.session
ProgressInvoicingProductRestViewProgressInvoicingProductRestView.after_flush()ProgressInvoicingProductRestView.collection_get()ProgressInvoicingProductRestView.dbsessionProgressInvoicingProductRestView.delete()ProgressInvoicingProductRestView.get_schema()ProgressInvoicingProductRestView.item_routeProgressInvoicingProductRestView.post()ProgressInvoicingProductRestView.requestProgressInvoicingProductRestView.routeProgressInvoicingProductRestView.session
ProgressInvoicingWorkItemRestViewProgressInvoicingWorkItemRestView.after_flush()ProgressInvoicingWorkItemRestView.collection_get()ProgressInvoicingWorkItemRestView.dbsessionProgressInvoicingWorkItemRestView.delete()ProgressInvoicingWorkItemRestView.item_routeProgressInvoicingWorkItemRestView.post()ProgressInvoicingWorkItemRestView.pre_format()ProgressInvoicingWorkItemRestView.requestProgressInvoicingWorkItemRestView.routeProgressInvoicingWorkItemRestView.schemaProgressInvoicingWorkItemRestView.session
includeme()
- endi.views.progress_invoicing.routes module
- endi.views.progress_invoicing.utils module
- Module contents
- endi.views.project package
- Submodules
- endi.views.project.business module
ProjectBusinessListViewProjectBusinessListView.add_estimation_urlProjectBusinessListView.add_invoice_urlProjectBusinessListView.add_template_varsProjectBusinessListView.childrenProjectBusinessListView.current()ProjectBusinessListView.current_id()ProjectBusinessListView.dbsessionProjectBusinessListView.default_directionProjectBusinessListView.default_sortProjectBusinessListView.filter_closed()ProjectBusinessListView.item_route_nameProjectBusinessListView.query()ProjectBusinessListView.requestProjectBusinessListView.route_nameProjectBusinessListView.schemaProjectBusinessListView.sessionProjectBusinessListView.sort_columnsProjectBusinessListView.stream_actions()ProjectBusinessListView.titleProjectBusinessListView.tree_urlProjectBusinessListView.tva_display_modeProjectBusinessListView.tva_on_margin
includeme()
- endi.views.project.controller module
- endi.views.project.estimation module
ProjectEstimationListViewProjectEstimationListView.add_template_varsProjectEstimationListView.add_urlProjectEstimationListView.childrenProjectEstimationListView.dbsessionProjectEstimationListView.filter_project()ProjectEstimationListView.requestProjectEstimationListView.route_nameProjectEstimationListView.schemaProjectEstimationListView.sessionProjectEstimationListView.title
includeme()
- endi.views.project.files module
- endi.views.project.invoice module
- endi.views.project.layout module
- endi.views.project.lists module
ProjectListToolsProjectListViewProjectListView.add_template_varsProjectListView.add_urlProjectListView.childrenProjectListView.dbsessionProjectListView.default_directionProjectListView.default_sortProjectListView.item_route_nameProjectListView.query()ProjectListView.requestProjectListView.route_nameProjectListView.schemaProjectListView.sessionProjectListView.sort_columnsProjectListView.stream_actions()ProjectListView.titleProjectListView.tree_url
includeme()redirect_to_customerslist()
- endi.views.project.phase module
- endi.views.project.project module
ProjectAddStep2ViewProjectAddStep2View.add_template_varsProjectAddStep2View.childrenProjectAddStep2View.dbsessionProjectAddStep2View.named_form_gridProjectAddStep2View.project_codesProjectAddStep2View.redirect()ProjectAddStep2View.requestProjectAddStep2View.route_nameProjectAddStep2View.schemaProjectAddStep2View.sessionProjectAddStep2View.title
ProjectAddViewProjectAddView.before()ProjectAddView.childrenProjectAddView.dbsessionProjectAddView.factoryProjectAddView.msgProjectAddView.named_form_gridProjectAddView.on_add()ProjectAddView.redirect()ProjectAddView.requestProjectAddView.route_nameProjectAddView.schemaProjectAddView.sessionProjectAddView.title
ProjectEditViewProjectEditView.add_template_varsProjectEditView.before()ProjectEditView.childrenProjectEditView.dbsessionProjectEditView.named_form_gridProjectEditView.projectProjectEditView.project_codesProjectEditView.redirect()ProjectEditView.requestProjectEditView.route_nameProjectEditView.schemaProjectEditView.sessionProjectEditView.title
ProjectEntryPointViewProjectGeneralViewProjectPhaseListViewincludeme()project_archive()project_delete()
- endi.views.project.rest_api module
BusinessTypeRestViewPhaseRestViewProjectRestViewProjectRestView.dbsessionProjectRestView.filter_archived()ProjectRestView.filter_customer_id()ProjectRestView.filter_search()ProjectRestView.form_config()ProjectRestView.format_collection()ProjectRestView.format_item_result()ProjectRestView.get_schema()ProjectRestView.list_schemaProjectRestView.post_format()ProjectRestView.query()ProjectRestView.requestProjectRestView.session
ProjectTreeRestViewProjectTypeRestViewincludeme()
- endi.views.project.routes module
- Module contents
- endi.views.sale_product package
- Submodules
- endi.views.sale_product.rest_api module
RestCurrentStockViewRestSaleProductCategoryViewRestSaleProductViewRestSaleProductView.after_flush()RestSaleProductView.catalog_get_view()RestSaleProductView.dbsessionRestSaleProductView.duplicate_view()RestSaleProductView.factoriesRestSaleProductView.filter_category_id()RestSaleProductView.filter_description_and_notes()RestSaleProductView.filter_label()RestSaleProductView.filter_mode()RestSaleProductView.filter_ref()RestSaleProductView.filter_supplier_id()RestSaleProductView.filter_supplier_ref()RestSaleProductView.filter_type_()RestSaleProductView.filter_types()RestSaleProductView.form_config()RestSaleProductView.get_schema()RestSaleProductView.list_schemaRestSaleProductView.on_delete()RestSaleProductView.post_format()RestSaleProductView.pre_format()RestSaleProductView.query()RestSaleProductView.requestRestSaleProductView.sessionRestSaleProductView.sort_columns
RestSaleProductsExportRestStockOperationViewRestWorkItemViewincludeme()
- endi.views.sale_product.routes module
- endi.views.sale_product.sale_product module
- Module contents
- endi.views.statistics package
- Submodules
- endi.views.statistics.rest_api module
RestStatisticCriterionRestStatisticCriterion.after_flush()RestStatisticCriterion.collection_get()RestStatisticCriterion.dbsessionRestStatisticCriterion.get_schema()RestStatisticCriterion.on_delete()RestStatisticCriterion.post_format()RestStatisticCriterion.pre_delete()RestStatisticCriterion.pre_format()RestStatisticCriterion.requestRestStatisticCriterion.session
RestStatisticEntryRestStatisticSheetincludeme()
- endi.views.statistics.routes module
- endi.views.statistics.statistics module
- Module contents
- endi.views.status package
- Submodules
- endi.views.status.rest_api module
StatusLogEntryRestViewStatusLogEntryRestView.after_flush()StatusLogEntryRestView.collection_get()StatusLogEntryRestView.dbsessionStatusLogEntryRestView.get_node_url()StatusLogEntryRestView.get_schema()StatusLogEntryRestView.notify_on_status_log_entry()StatusLogEntryRestView.post_format()StatusLogEntryRestView.requestStatusLogEntryRestView.session
get_other_users_for_notification()user_json_repr_for_select()
- endi.views.status.utils module
- Module contents
- endi.views.supply package
- endi.views.task package
- Submodules
- endi.views.task.pdf_rendering_service module
- endi.views.task.pdf_storage_service module
- endi.views.task.rest_api module
DiscountLineRestViewDiscountLineRestView.after_flush()DiscountLineRestView.collection_get()DiscountLineRestView.dbsessionDiscountLineRestView.get_schema()DiscountLineRestView.on_delete()DiscountLineRestView.post_format()DiscountLineRestView.post_percent_discount_view()DiscountLineRestView.requestDiscountLineRestView.session
PostTTCLineRestViewTaskAddRestViewTaskFileRequirementRestViewTaskLineGroupRestViewTaskLineRestViewTaskRestViewTaskStatusLogEntryRestViewtask_total_view()
- endi.views.task.utils module
collect_price_study_product_types()get_business_types()get_default_product_id()get_default_tva()get_field_definition()get_mentions()get_payment_conditions()get_products()get_task_insurance_options()get_task_parent_url()get_task_url()get_task_view_type()get_tvas()get_workunits()task_pdf_link()
- endi.views.task.views module
BaseTaskHtmlTreeMixinTaskAddViewTaskDeleteViewTaskDuplicateViewTaskEditViewTaskFilesViewTaskGeneralViewTaskJsAppViewMixinTaskMoveToPhaseViewTaskPdfDevViewTaskPdfViewTaskPreviewViewTaskSetDraftViewTaskSetMetadatasViewTaskSetMetadatasView.before()TaskSetMetadatasView.buttonsTaskSetMetadatasView.cancel_failure()TaskSetMetadatasView.cancel_success()TaskSetMetadatasView.dbsessionTaskSetMetadatasView.redirect()TaskSetMetadatasView.requestTaskSetMetadatasView.schemaTaskSetMetadatasView.sessionTaskSetMetadatasView.submit_success()TaskSetMetadatasView.title
TaskSetProductsViewTaskStatusViewTaskStatusView.check_allowed()TaskStatusView.dbsessionTaskStatusView.get_parent_url()TaskStatusView.get_redirect_url()TaskStatusView.post_status_process()TaskStatusView.post_valid_process()TaskStatusView.pre_status_process()TaskStatusView.pre_valid_process()TaskStatusView.pre_wait_process()TaskStatusView.requestTaskStatusView.sessionTaskStatusView.state_manager_keyTaskStatusView.validate()
TaskZipFileViewget_customer_redirect_btn()get_project_redirect_btn()
- Module contents
- endi.views.third_party package
- Subpackages
- endi.views.third_party.customer package
- Submodules
- endi.views.third_party.customer.base module
- endi.views.third_party.customer.controller module
- endi.views.third_party.customer.lists module
- endi.views.third_party.customer.rest_api module
- endi.views.third_party.customer.routes module
- endi.views.third_party.customer.views module
- Module contents
- endi.views.third_party.supplier package
- Submodules
- endi.views.third_party.supplier.base module
- endi.views.third_party.supplier.layout module
- endi.views.third_party.supplier.lists module
- endi.views.third_party.supplier.rest_api module
- endi.views.third_party.supplier.routes module
- endi.views.third_party.supplier.supplier module
- Module contents
- endi.views.third_party.customer package
- Module contents
- Subpackages
- endi.views.training package
- Submodules
- endi.views.training.business_bpf module
BusinessBPFDataEditViewBusinessBPFDataEditView.add_template_varsBusinessBPFDataEditView.before()BusinessBPFDataEditView.childrenBusinessBPFDataEditView.context_modelBusinessBPFDataEditView.delete_linkBusinessBPFDataEditView.get_context_model()BusinessBPFDataEditView.is_creation_formBusinessBPFDataEditView.merge_appstruct()BusinessBPFDataEditView.on_edit()BusinessBPFDataEditView.other_bpf_datasBusinessBPFDataEditView.redirect()BusinessBPFDataEditView.route_nameBusinessBPFDataEditView.schemaBusinessBPFDataEditView.submit_success()BusinessBPFDataEditView.title
BusinessBPFDataListViewBusinessBPFDeleteViewBusinessBPFMixinincludeme()
- endi.views.training.dashboard module
- endi.views.training.lists module
- endi.views.training.routes module
- endi.views.training.trainer module
TrainerDatasDeleteViewTrainerDatasEditViewTrainerDatasEditView.add_template_varsTrainerDatasEditView.before()TrainerDatasEditView.buttonsTrainerDatasEditView.current_trainerdatasTrainerDatasEditView.dbsessionTrainerDatasEditView.delete_urlTrainerDatasEditView.get_context_model()TrainerDatasEditView.redirect()TrainerDatasEditView.requestTrainerDatasEditView.schemaTrainerDatasEditView.sessionTrainerDatasEditView.title
TrainerDatasFileAddViewTrainerDatasFileListUserTrainerDatasEditViewUserTrainerDatasFileListadd_views()includeme()register_menus()trainerdatas_add_entry_view()
- Module contents
- endi.views.user package
- Submodules
- endi.views.user.company module
- endi.views.user.connections module
UserConnectionsListViewUserConnectionsListView.dbsessionUserConnectionsListView.default_sortUserConnectionsListView.filter_month()UserConnectionsListView.filter_year()UserConnectionsListView.more_template_vars()UserConnectionsListView.populate_actionmenu()UserConnectionsListView.query()UserConnectionsListView.requestUserConnectionsListView.schemaUserConnectionsListView.sessionUserConnectionsListView.sort_columnsUserConnectionsListView.title
includeme()
- endi.views.user.layout module
- endi.views.user.lists module
BaseUserListViewBaseUserListView.add_template_varsBaseUserListView.dbsessionBaseUserListView.filter_activity_id()BaseUserListView.filter_name_search()BaseUserListView.filter_user_group()BaseUserListView.query()BaseUserListView.requestBaseUserListView.schemaBaseUserListView.sessionBaseUserListView.sort_columnsBaseUserListView.stream_actions()BaseUserListView.title
GeneralAccountListincludeme()
- endi.views.user.login module
- endi.views.user.rest_api module
- endi.views.user.routes module
- endi.views.user.tools module
- endi.views.user.user module
UserAccountEditViewUserAccountEditView.dbsessionUserAccountEditView.get_default_appstruct()UserAccountEditView.merge_appstruct()UserAccountEditView.msgUserAccountEditView.on_edit()UserAccountEditView.redirect()UserAccountEditView.requestUserAccountEditView.schemaUserAccountEditView.sessionUserAccountEditView.title
UserAccountingEditViewUserAddViewUserDeleteViewUserEditViewincludeme()user_add_manager_entry_point()user_view()
- Module contents
- endi.views.userdatas package
- Submodules
- endi.views.userdatas.career_path module
CareerPathAddStageCareerPathDeleteStageCareerPathEditStageCareerPathEditStage.add_template_varsCareerPathEditStage.before()CareerPathEditStage.current_userdatasCareerPathEditStage.dbsessionCareerPathEditStage.filesCareerPathEditStage.requestCareerPathEditStage.schemaCareerPathEditStage.sessionCareerPathEditStage.submit_success()CareerPathEditStage.title
CareerPathListUserCareerPathAddStageUserCareerPathEditStageUserCareerPathListadd_views()includeme()
- endi.views.userdatas.filelist module
- endi.views.userdatas.lists module
- endi.views.userdatas.py3o module
- endi.views.userdatas.routes module
- endi.views.userdatas.userdatas module
UserDatasDeleteViewUserDatasDocTypeViewUserDatasDocTypeView.add_template_varsUserDatasDocTypeView.before()UserDatasDocTypeView.current_userdatasUserDatasDocTypeView.dbsessionUserDatasDocTypeView.form_optionsUserDatasDocTypeView.is_voidUserDatasDocTypeView.requestUserDatasDocTypeView.schemaUserDatasDocTypeView.sessionUserDatasDocTypeView.submit_success()UserDatasDocTypeView.title
UserDatasEditViewUserDatasEditView.add_template_varsUserDatasEditView.before()UserDatasEditView.buttonsUserDatasEditView.current_userdatasUserDatasEditView.dbsessionUserDatasEditView.delete_urlUserDatasEditView.get_context_model()UserDatasEditView.get_schema()UserDatasEditView.redirect()UserDatasEditView.requestUserDatasEditView.sessionUserDatasEditView.title
UserUserDatasDocTypeViewUserUserDatasEditViewadd_views()ensure_doctypes_rel()includeme()register_menus()userdatas_add_entry_point()userdatas_add_view()
- Module contents
- endi.views.workshops package
- Submodules
- endi.views.workshops.export module
- endi.views.workshops.lists module
BaseWorkshopListViewBaseWorkshopListView.add_template_varsBaseWorkshopListView.current_user_idBaseWorkshopListView.dbsessionBaseWorkshopListView.is_admin_viewBaseWorkshopListView.is_companyBaseWorkshopListView.is_edit_viewBaseWorkshopListView.requestBaseWorkshopListView.sessionBaseWorkshopListView.signout_labelBaseWorkshopListView.signup_labelBaseWorkshopListView.stream_actions()
CaeWorkshopListViewCompanyWorkshopListViewCompanyWorkshopListView.add_template_varsCompanyWorkshopListView.company_idCompanyWorkshopListView.current_user_idCompanyWorkshopListView.current_usersCompanyWorkshopListView.dbsessionCompanyWorkshopListView.filter_company_manager_or_cae()CompanyWorkshopListView.is_companyCompanyWorkshopListView.requestCompanyWorkshopListView.schemaCompanyWorkshopListView.sessionCompanyWorkshopListView.stream_actions()CompanyWorkshopListView.title
CompanyWorkshopSubscribedListViewCompanyWorkshopSubscribedListView.add_template_varsCompanyWorkshopSubscribedListView.current_user_idCompanyWorkshopSubscribedListView.current_usersCompanyWorkshopSubscribedListView.dbsessionCompanyWorkshopSubscribedListView.filter_participant()CompanyWorkshopSubscribedListView.is_admin_viewCompanyWorkshopSubscribedListView.is_edit_viewCompanyWorkshopSubscribedListView.requestCompanyWorkshopSubscribedListView.schemaCompanyWorkshopSubscribedListView.sessionCompanyWorkshopSubscribedListView.stream_actions()CompanyWorkshopSubscribedListView.title
UserWorkshopSubscribedListViewUserWorkshopSubscribedListView.dbsessionUserWorkshopSubscribedListView.filter_participant()UserWorkshopSubscribedListView.requestUserWorkshopSubscribedListView.schemaUserWorkshopSubscribedListView.sessionUserWorkshopSubscribedListView.signout_labelUserWorkshopSubscribedListView.signup_labelUserWorkshopSubscribedListView.stream_actions()UserWorkshopSubscribedListView.title
UserWorkshopSubscriptionsListViewUserWorkshopSubscriptionsListView.add_template_varsUserWorkshopSubscriptionsListView.current_user_idUserWorkshopSubscriptionsListView.current_usersUserWorkshopSubscriptionsListView.dbsessionUserWorkshopSubscriptionsListView.filter_participant()UserWorkshopSubscriptionsListView.is_admin_viewUserWorkshopSubscriptionsListView.is_edit_viewUserWorkshopSubscriptionsListView.requestUserWorkshopSubscriptionsListView.schemaUserWorkshopSubscriptionsListView.sessionUserWorkshopSubscriptionsListView.title
WorkshopListToolsWorkshopListTools.default_directionWorkshopListTools.default_sortWorkshopListTools.filter_company_manager_or_cae()WorkshopListTools.filter_date()WorkshopListTools.filter_info_1_id()WorkshopListTools.filter_notfilled()WorkshopListTools.filter_participant()WorkshopListTools.filter_search()WorkshopListTools.filter_tags()WorkshopListTools.filter_trainer()WorkshopListTools.query()WorkshopListTools.schemaWorkshopListTools.sort_columnsWorkshopListTools.title
WorkshopListViewincludeme()
- endi.views.workshops.workshop module
WorkShopDuplicateViewWorkshopAddViewWorkshopEditViewadd_routes()add_tree_to_navigation()add_views()get_default_timeslots()get_new_datetime()includeme()record_attendances_view()timeslot_pdf_view()timeslots_pdf_output()workshop_delete_view()workshop_pdf_view()workshop_signout_view()workshop_signup_view()workshop_view()
- Module contents
Submodules¶
endi.views.auth module¶
- endi.views.auth.includeme(config)¶
endi.views.commercial module¶
Commercial Management module
- class endi.views.commercial.DisplayCommercialHandling(context, request)¶
Bases :
BaseViewCommercial handling view Allows to get commercial informations by year through GET Allows to set turnover projections through POST
- customers()¶
Return the number of real customers (with invoices) for the current year
- estimations()¶
Query for estimations
- form_schema = <endi.forms.commercial.CommercialSetFormSchema object at 140624215313936 (named )>¶
- get_year_form()¶
Return the year selection form
- submit_success(appstruct)¶
Add/Edit a turnover projection in the database
- submit_year()¶
Validate the year form datas
- property title¶
- turnover_projections()¶
Return a query for turnover projections
- turnovers()¶
Return the realised turnovers
- validated_estimations()¶
Query for estimations where an invoice has been generated
- year_form_schema = <endi.forms.commercial.CommercialFormSchema object at 140624215313744 (named )>¶
- endi.views.commercial.compute_turnover_difference(index, projections, turnovers)¶
Compute the difference beetween the projection and the real value
- endi.views.commercial.compute_turnover_percent(index, projections, turnovers)¶
Compute the percent the difference represents
- endi.views.commercial.get_current_url(request)¶
return the current url with arguments
- endi.views.commercial.get_form(counter)¶
Return the form for turnover projection configuration
- endi.views.commercial.get_month_range(month, year)¶
Return month range enclosing the current month
- endi.views.commercial.get_year_range(year)¶
Return year range enclosing the current year
- endi.views.commercial.includeme(config)¶
endi.views.competence module¶
Competence evaluation module
1- Choose a deadline (if manager choose also a contractor) 2- Fill the displayed grid 3- Display a printable version
- class endi.views.competence.RestCompetenceGrid(context, request=None)¶
Bases :
BaseViewJson api for competence grid handling
- get()¶
- class endi.views.competence.RestCompetenceGridItem(context, request=None)¶
Bases :
BaseRestViewRest view for Item handling
Provides :
get collection
edit element
- collection_get()¶
Return list of items for a given grid context is a grid
- property schema¶
- class endi.views.competence.RestCompetenceGridSubItem(context, request=None)¶
Bases :
BaseRestViewRest view for Sub item handling:
Provides:
get collection
edit element
- collection_get()¶
Return list of subitems for a given item context is an item
- property schema¶
- endi.views.competence.add_routes(config)¶
Add module related routes
- endi.views.competence.competence_form_options(context, request)¶
Returns datas used to build the competence form page
- endi.views.competence.competence_grid_view(context, request)¶
The competence grid base view
- endi.views.competence.competence_index_view(context, request)¶
Index view to go to a competence grid
Both admin and user view
- Paramètres:
request (obj) – The pyramid request
- endi.views.competence.competence_radar_chart_datas(context, request)¶
Return the datas used to show a radar / spider chart of a user’s competences context : CompetenceGrid
- endi.views.competence.competence_radar_chart_view(context, request)¶
Competence radar chart view
- Paramètres:
context (obj) – a user model
- endi.views.competence.get_competence_grid(request, contractor_id, deadline_id)¶
Return a competence grid record for the given user and deadline
- endi.views.competence.includeme(config)¶
Pyramid’s inclusion mechanism
- endi.views.competence.redirect_to_competence_grid(request, appstruct)¶
Redirect to the appropriate competence grid
- endi.views.competence.validate_competence_grid_query(request)¶
Validate datas posted to access a competence grid
- Paramètres:
request (obj) – The pyramid request
endi.views.csv_import module¶
endi.views.holiday module¶
Simple stuff for handling holidays declaration/view
- class endi.views.holiday.AdminHolidayView(request)¶
Bases :
BaseFormViewHoliday search/consultation views
- schema = <endi.forms.holiday.SearchHolidaysSchema object at 140624478881744 (named )>¶
Colander schema instance to be used to create the form instance. Provide your schema in your derived class.
- submit_success(appstruct)¶
- title = 'Les congés des entrepreneurs'¶
- class endi.views.holiday.HolidayJson(model, bind_params=None)¶
Bases :
RestJsonReprWraps a holiday to a json representation
- schema = <endi.forms.holiday.HolidaySchema object at 140624233330192 (named )>¶
- class endi.views.holiday.RestHoliday(context, request=None)¶
Bases :
BaseViewJson-Rest api for holidays handling /holidays/{id}
- delete()¶
Rest delete method : delete a line
- get()¶
Rest get method : return a line
- getOne()¶
get an holiday entry
- model_wrapper¶
alias de
HolidayJson
- post()¶
Rest post method : add a line
- put()¶
Rest put method : update a line
- property schema¶
- endi.views.holiday.add_routes(config)¶
Add module’s related routes
- endi.views.holiday.get_holidays(start_date=None, end_date=None, user_id=None)¶
Return the user’s declared holidays
- endi.views.holiday.holidays_json(request)¶
json view for holidays
- endi.views.holiday.includeme(config)¶
- endi.views.holiday.user_holidays_index(request)¶
Base view for holidays editing
endi.views.index module¶
Index view
- endi.views.index.includeme(config)¶
Adding the index view on module inclusion
- endi.views.index.index(request)¶
Index page
endi.views.indicators module¶
- endi.views.indicators.includeme(config)¶
endi.views.job module¶
Job related pages
- class endi.views.job.JobList(*args, **kwargs)¶
Bases :
BaseListView- default_direction = 'desc'¶
- default_sort = 'created_at'¶
- filter_status(query, appstruct)¶
- filter_type(query, appstruct)¶
- query()¶
The main query, should be overrided by a subclass
- schema = <endi.forms.lists.BaseListsSchema object at 140624215001680 (named )>¶
- sort_columns = {'created_at': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}¶
- title = 'Historique des tâches'¶
- endi.views.job.includeme(config)¶
- endi.views.job.job_json_model_view(context, request)¶
Return a job as json datas, check if the job should be cancelled or not
- endi.views.job.job_view(context, request)¶
- Paramètres:
context (obj) – The job we want to watch
request (obj) – The pyramid request object
- endi.views.job.make_stream_csv_by_key(job_key, filename)¶
Build a view streaming the key attr of the current context as a csv file
endi.views.json module¶
Json API views DEPRECATED
- endi.views.json.includeme(config)¶
Configure the views for this module
- endi.views.json.json_model_view(request)¶
Return a json representation of a model
endi.views.manage module¶
- Manage view :
last documents page
- class endi.views.manage.ShortcutButton(url, icon, text, title)¶
Bases :
tuple- property icon¶
Alias for field number 1
- property text¶
Alias for field number 2
- property title¶
Alias for field number 3
- property url¶
Alias for field number 0
- endi.views.manage.includeme(config)¶
- endi.views.manage.manage(request)¶
The manage view
endi.views.payment module¶
- endi.views.payment.includeme(config)¶
endi.views.render_api module¶
render api, usefull functions usable inside templates
- class endi.views.render_api.Api(context, request)¶
Bases :
objectApi object passed to the templates hosting all commands we will use
- static cancelinvoice_get_major_status(cinvoice)¶
Return the most significant status for the given task
- static cancelinvoice_status_icon(cinvoice)¶
Return the name of the icon matching the status
- static clean_html(text)¶
Return a sanitized version of an html code keeping essential html tags and allowing only a few attributes
- static compile_template_str(template_string, template_context)¶
Compile the template string and merge the context
- static custom_indicator_icon(indicator_name: str) str¶
Returns an icon identifier representing the type of the custom indicator
- static doctype_icon(node)¶
- static estimation_get_major_status(estimation)¶
Return the most significant status for the given task
- static estimation_status_icon(estimation)¶
Return the name of the icon matching the status
- file_url(fileobj)¶
Return the url to access the given fileobj
- static format_account(account, reverse=True, upper=True)¶
return {firstname} {lastname}
- static format_activity_status(activity)¶
Return a formatted status string for the given activity
- static format_amount(amount, trim=True, grouping=True, precision=2, display_precision=None, html=True, currency=False)¶
return a pretty printable amount
- Paramètres:
on locales) :param int precision: The decimal precision to convert the amount to (Decimal amounts are stored as BigInteger in the database to avoid float precision conflicts and facilitate computation, here precision indicates with which 10**precision the conversion is made) :param int display_precision: The precision used to display the amount (trimming strategy)
- static format_cancelinvoice_status(cinvoice, full=True)¶
Return a string representing the state of this cancelinvoice
- Paramètres:
cinvoice (obj) – A CancelInvoice instance
- static format_civilite(civilite_str)¶
Shorten the civilite string
- static format_date(date, short=True)¶
return a pretty print version of the date object
- static format_datetime(datetime_object, timeonly=False)¶
format a datetime object
- static format_duration(duration, short=True)¶
return a pretty print version of a duration.
- static format_estimation_status(estimation, full=True)¶
Return a formatted string for estimation specific status
- static format_expense_status(expense, full=True)¶
- static format_float(value, precision=None, grouping=True, html=True, wrap_decimals=False)¶
- Format a float value :
Localized version with grouped values
trim datas to precision if asked for
- Paramètres:
) :returns: A formatted string that can be used in html outputs :rtype: str
- static format_indicator_status(status: str) str¶
Return a formatted status string for the given indicator
- static format_invoice_status(invoice, full=True)¶
Return a formatted string for invoice specific status
- Paramètres:
invoice (obj) – An invoice instance
- static format_long_date(date: date, include_dayname: bool = True) str¶
Convert a date to a localized string
>>> import datetime >>> d = datetime.date.today() >>> format_long_date(d, include_name=True) Jeudi 22 juin 2023
- static format_long_date_with_name(date: date, include_dayname: bool = True) str¶
Convert a date to a localized string
>>> import datetime >>> d = datetime.date.today() >>> format_long_date(d, include_name=True) Jeudi 22 juin 2023
- static format_long_datetime(datetime_object: date, include_dayname: bool = True) str¶
Convert a datetime to a localized string
>>> import datetime >>> d = datetime.datetime.now() >>> format_long_datetime(d, include_dayname=True) Jeudi 22 juin 2023 à 10h22
- static format_name(firstname, lastname, reverse=True, upper=True)¶
format firstname and lastname in a common format
- static format_paymentmode(paymentmode)¶
format payment modes for display Since #662 ( Permettre la configuration des modes de paiement ) no formatting is necessary
- static format_quantity(quantity)¶
format the quantity
- static format_short_date(date)¶
return a short printable version of the date obj
- static format_status(element, full=True)¶
- static format_status_sentence(element)¶
Same as format status but with a full sentence.
E.g.: « Cette note de dépenses a été validée. »
- static format_status_string(status: StatusLogEntry, genre='')¶
Return a label for the given status
- static format_supplier_invoice_status(supplier_invoice, full=True)¶
- static format_task_type(task)¶
- static groupby(elements: Iterable, attrname: str) Tuple[Any, Iterable]¶
Specialized version of itertools.groupby grouping on attribute
Note that for this to work, elements should be already ordered to allow grouping ; see itertools.groupby doc.
- has_permission(perm_name, context=None)¶
- static human_readable_filesize(size)¶
Return a human readable file size
- icon(icon_name, css_classes='')¶
Crafts the HTML to include the named icon. :param icon_name: see https://endi.sophieweb.com/html/icones.html
- img_url(fileobj)¶
Return the url to access the given fileobj as an image
- static invoice_get_major_status(invoice)¶
Return the most significant status for the given task
- static invoice_status_icon(invoice)¶
Return the name of the icon matching the status
- static major_status(element)¶
- static month_name(index, capitalize=False)¶
Return the name of the month number « index »
- overridable_label(label_key: str, context: Node) str¶
Gets a label, possibly overriden by db setting and/or frozen setting
- static pluralize(collection, plural_mark='s', singular_mark='')¶
Helps handling the singular/plural forms of a word
>>> 'Simpson' + pluralize(['bart']) 'Simpson' >>> 'Simpson' + pluralize(['homer', 'bart']) 'Simpsons'
>>> pluralize(['Jolly Jumper'], 'chevaux', 'cheval') 'cheval'
>>> 'chou' + 'pluralize(['rave'], 'x') 'chou'
- Paramètres:
collection – list-like object
- static remove_kms_training_zeros(amount)¶
Removed unnecessary kms amount training zeros :param amount: :return: amount
- route_exists(module_name)¶
Check if a route is enabled/exists
- Paramètres:
route_name (str) – The route name (first argument of add_route)
- static short_month_name(index)¶
Return the short name of the month number « index »
- static status_css_class(element)¶
Return a status css class for the element
- Paramètres:
element (obj) – An instance of a SQLA model
- static status_icon(element, status=None)¶
- task_url(*args, **kwargs)¶
Build an url to access a task
- urlupdate(args_dict={})¶
Return the current url with updated GET params It allows to keep url params when : * sorting * searching * moving from one page to another
- if current url ends with :
<url>?foo=1&bar=2
- when passing {“foo”:5}, we get :
<url>?foo=5&bar=2
- write_js_app_option(option_key: str, option_value: any) str¶
Build a js string for setting an AppOption key/value
Handle different value types so that they be set in the right format in js
>>> print(api.write_js_app_option("key", "value")) AppOption["key"] = "value";
>>> print(api.write_js_app_option("key", 5)) AppOption["key"] = 5;
>>> print(api.write_js_app_option("key", True)) AppOption["key"] = true;
- endi.views.render_api.build_icon_str(request, icon_name: str, css_classes: str = '') str¶
Crafts the HTML to include the named icon. :param icon_name: see https://endi.sophieweb.com/html/icones.html
- endi.views.render_api.cancelinvoice_status_icon(cinvoice)¶
Return the name of the icon matching the status
- endi.views.render_api.custom_indicator_icon(indicator_name: str) str¶
Returns an icon identifier representing the type of the custom indicator
- endi.views.render_api.estimation_status_icon(estimation)¶
Return the name of the icon matching the status
- endi.views.render_api.expense_status_css_class(expense)¶
- endi.views.render_api.expense_status_icon(expense)¶
Return the name of the icon matching the status
- endi.views.render_api.indicator_status_css(indicator) str¶
Return an icon representing the indicator status
- endi.views.render_api.indicator_status_icon(indicator) str¶
Return an icon representing the indicator status
- endi.views.render_api.invoice_status_icon(invoice)¶
Return the name of the icon matching the status
- endi.views.render_api.sale_doctype_icon(node)¶
- endi.views.render_api.status_css_class(element)¶
Return a status css class for the element
- Paramètres:
element (obj) – An instance of a SQLA model
- endi.views.render_api.status_icon(element, status=None)¶
- endi.views.render_api.status_log_entry_icon(status_log_entry)¶
- endi.views.render_api.supplier_invoice_status_icon(supplier_invoice)¶
- endi.views.render_api.supplier_order_status_icon(supplier_order)¶
endi.views.rest_consts module¶
- endi.views.rest_consts.config_rest_view(request)¶
- endi.views.rest_consts.country_rest_view(request)¶
- endi.views.rest_consts.department_rest_view(request)¶
- endi.views.rest_consts.includeme(config)¶
- endi.views.rest_consts.street_number_complements_rest_view(request)¶
- endi.views.rest_consts.street_type_rest_view(request)¶
endi.views.static module¶
Custom views for dynamic static datas
- endi.views.static.includeme(config)¶
- endi.views.static.make_root_static_view(filename, ctype)¶
Return a static view rendering given file with headers set to the ctyp Content-Type
endi.views.tests module¶
endi.views.treasury_files module¶
Module contents¶
Base views with commonly used utilities
- class endi.views.AsyncJobMixin¶
Bases :
objectHelpers for the views launching and watching celery tasks
Handles popup views as well as regular views
- initialize_job_result(job_class, **kwargs) Job¶
Record the empty job result to database
- Paramètres:
job_class –
kwargs – any kwargs, are passed to Job constuctor
- redirect_to_job_watch(job, job_result)¶
- class endi.views.BaseAddView(context, request=None)¶
Bases :
BaseFormViewAdmin view that should be subclassed adding a colanderalchemy schema
- class AdminModel(BaseAddView):
schema = SQLAlchemySchemaNode(MyModel) model = MyModel
- add_template_vars = ('title', 'help_msg')¶
- create_instance()¶
Initiate a new instance
- factory = None¶
- property help_msg¶
- merge_appstruct(appstruct, model)¶
Merge the appstruct with the newly create model
- Paramètres:
appstruct (dict) – Validated form datas
model (obj) – A new instance of the object we create
- Renvoie:
The model this view is supposed to add
- msg = 'Vos modifications ont bien été enregistrées'¶
- redirect_route = None¶
- submit_success(appstruct)¶
- class endi.views.BaseCsvView(*args, **kwargs)¶
Bases :
BaseListClassWithFormBase Csv view
A list view that returns a streamed file
A subclass should implement :
a query method
filename property
To be able to handle the rows that are streamed:
a _stream_rows method
If this view should support the GET params filtering method (export associated to a list view), a subclass should provide:
a schema attr
filter_ methods
- property filename¶
To be implemented by the subclass
- model = None¶
- writer¶
alias de
SqlaCsvExporter
- class endi.views.BaseEditView(context, request=None)¶
Bases :
BaseFormViewColanderAlchemy schema based view
- class AdminModel(BaseEditView):
schema = SQLAlchemySchemaNode(MyModel)
Methods and attributes you can set
Form Schema related hooks
attribute schema
Form Schema to use in this form view Can be
a callable a class an instance of a schema
get_schema
- add_template_vars = ('title', 'help_msg')¶
- before(form)¶
Performs some processing on the
formprior to rendering.By default, this method does nothing. Override this method in your dervived class to modify the
form. Your function will be executed immediately after instansiating the form instance in__call__()(thus before obtaining widget resources, considering buttons, or rendering).
- cancel_success(appstruct)¶
- get_context_model()¶
Return the model we’re editing, by default it’s the current context but in case of OneToOne relationship, it can be that the context is a related model, Overriding this method we can provide the model to edit
- Renvoie:
The model that will be edited by this view
- get_default_appstruct()¶
Collect datas that will initially populate the form
- property help_msg¶
- merge_appstruct(appstruct, model)¶
Merge the appstruct with current model
- Paramètres:
appstruct (dict) – Validated form datas
model (obj) – A new instance of the object we create
- Renvoie:
The model this view is supposed to add
- msg = 'Vos modifications ont bien été enregistrées'¶
- on_edit(appstruct, model)¶
Hook launched before the session is flushed
- redirect_route = None¶
- submit_success(appstruct)¶
- class endi.views.BaseFormView(context, request=None)¶
Bases :
FormView,PopupMixinAllows to easily build form views
Attributes that you may override
- add_template_vars¶
List of attribute names (or properties) that will be added to the result dict object and that you will be able to use in your templates ((“title”,) by default)
- buttons¶
list or tupple of deform.Button objects (or strings), only a submit button is added by default
- schema¶
colander form schema to be used to render our form you may also want to override get_schema method instead
- form_class¶
form class to use (deform.Form by default)
Methods that your should implement
- <button_name>_success(appstruct)
Is called when the form has been submitted and validated with the button called button_name.
appstruct : the colander validated datas (a dict)
Methods that you may implement
- before(form)¶
Allows to execute some code before the validation process e.g: add datas to the form that will be rendered Will typically be overrided in an edit form.
form : the form object that’s used in our view
- get_schema(): return the unbound schema to be used ; may be
- preferred to schema attribute if you want something dynamic.
- <button_name>_failure(e)
Is called when the form has been submitted the button called button_name and the datas have not been validated.
- edeform.exception.ValidationFailure that has
been raised by colander
class MyFormView(BaseFormView): title = "My form view" schema = MyColanderSchema def before(self, form): form.set_appstruct(self.request.context.appstruct()) def submit_success(self, appstruct): # Handle the filtered appstruct
- add_template_vars = ()¶
- before(form)¶
Performs some processing on the
formprior to rendering.By default, this method does nothing. Override this method in your dervived class to modify the
form. Your function will be executed immediately after instansiating the form instance in__call__()(thus before obtaining widget resources, considering buttons, or rendering).
- buttons = (<deform.form.Button object>,)¶
Tuple of buttons or strings to pass to the form instance. Override in your derived class.
- form_label() str¶
Usefull optionnal tool used in multiform views (when we can add an element in different ways
- Renvoie:
The name of the submitted form
- Type renvoyé:
- schema = None¶
Colander schema instance to be used to create the form instance. Provide your schema in your derived class.
- submit_failure(e)¶
Called by default when we failed to submit the values We add a token here for forms that are collapsed by default to keep them open if there is an error
- title = None¶
- use_csrf_token = False¶
- class endi.views.BaseListClass(context, request=None)¶
Bases :
BaseViewBase class for list related views (list view and exports)
It launches a query to retrieve records
Validates GET params regarding the given schema
filter the query with the provided filter_* methods
- @param schema: Schema used to validate the GET params provided in the
url, the schema should inherit from endi.views.forms.lists.BaseListsSchema to preserve most of the processed automation
- @param sort_columns: dict of {“sort_column_key”:”sort_column”…}.
Allows to generate the validator for the sort availabilities and to automatically add a order_by clause to the query. sort_column may be equal to Table.attribute if join clauses are present in the main query.
@default_sort: the default sort_column_key to be used @default_direction: the default sort direction (one of [“asc”, “desc”])
- Subclass should provide
a view callable (either __call__() or a named method).
a _collect_appstruct() method
- default_direction = 'asc'¶
- default_sort = 'name'¶
- query()¶
The main query, should be overrided by a subclass
- schema = None¶
- sort_columns = {'name': 'name'}¶
- class endi.views.BaseListClassWithForm(*args, **kwargs)¶
Bases :
BaseListClassA list view, handling a search/filter form.
A subclass shoud provide at least a schema and a query method
- dbsession: <sqlalchemy.orm.scoping.scoped_session object at 0x7fe5b76f0350>¶
- filter_button_css = 'btn btn-primary icon only'¶
- filter_button_icon = 'search'¶
- filter_button_label = 'Lancer la recherche avec ces critères'¶
- get_filter_button()¶
Return the definition of the filter button
- get_form(schema)¶
Return the search form that should be used for this view
- Paramètres:
schema (obj) – The form’s colander.Schema
- Renvoie:
The form object
- Type renvoyé:
obj
- grid = None¶
- request: Request¶
- session: <InterfaceClass pyramid.interfaces.ISession>¶
- set_form_widget(form)¶
Attach a custom widget to the given form
- Paramètres:
form (obj) – The deform.Form instance
- Renvoie:
The deform.Form instance
- Type renvoyé:
obj
- class endi.views.BaseListView(*args, **kwargs)¶
Bases :
BaseListClassWithFormA base list view used to provide an easy way to build list views Uses the BaseListClass and add the templating datas :
Provide a pagination object
Provide a search form based on the given schema
Launches complementary methods to populate request vars like popup
or actionmenu
- @param add_template_vars: list of attributes (or properties)
that will be automatically added
- add_template_vars = ()¶
- dbsession: <sqlalchemy.orm.scoping.scoped_session object at 0x7fe5b76f0350>¶
- grid = None¶
- more_template_vars(response_dict)¶
Add template vars to the response dict List the attributes configured in the add_template_vars attribute and add them
Used to populate an actionmenu (if there’s one in the page) actionmenu is a request attribute used to automate the integration of actionmenus in pages
- request: Request¶
- session: <InterfaceClass pyramid.interfaces.ISession>¶
- use_paginate = True¶
- class endi.views.BaseOdsView(*args, **kwargs)¶
Bases :
BaseCsvView- dbsession: <sqlalchemy.orm.scoping.scoped_session object at 0x7fe5b76f0350>¶
- request: Request¶
- session: <InterfaceClass pyramid.interfaces.ISession>¶
- writer¶
alias de
SqlaOdsExporter
- class endi.views.BaseRestView(context, request=None)¶
Bases :
BaseViewA base rest view
provides the base structure for a rest view for sqlalchemy model access
it handles :
get delete put post requests
thanks to the colanderalchemy tools, we dynamically build the resulting model
Main Add/edit process:
1- get_schema 2- Hook : pre_format 3- create/update model 4- Hook : post_format 5- session.merge/session.add 6- Hook : after_flush
Following datas should be provided :
Attributes
schema
A colanderalchemy schema, it can be provided through a property or a simple attribute. For on the fly schema handling, you can also override the get_schema method that returns self.schema by default
The following could be provided
Methods
get_schema
See above comment
pre_format
Preformat submitted values before passing them to the form schema
post_format
Launched after the model has been created/updated and before add/merge
after_flush
Launched after the entry was added / merged in the session and flushed
For get method :
a « fields » parameter can be passed to get a subset of the context’s json data
GET /api/v1/estimations/125?fields=attachments&fields=description
NB : - Only attributes and properties can be retrieved that way - Unless what is done in the __json__ method, the data are returned without any
formatting
- after_flush(entry, edit, attributes)¶
Allows to modify datas after the main entry was flushed
HTTP POST and PUT calls
- delete()¶
HTTP DELETE api endpoint
- format_item_result(model) Union[dict, object]¶
Build the data to be returned by the api endpoint
- Paramètres:
item – The current sqlalchemy Model
- Renvoie:
An object with a __json__ method or a dict that can be json serialized
- get()¶
End point for HTTP GET calls
- get_editted_element(attributes)¶
Returns the element we edit
HTTP PUT calls
- Paramètres:
attributes (dict) – The validated submitted data
- get_posted_data()¶
Returns the data passed for a PUT/POST request Handle the case where we send multipart/form-data formatted data (case we send a file through ajax calls)
- get_schema(submitted: dict) Union[SQLAlchemySchemaNode, Schema]¶
Build the colander schema to be used
- Paramètres:
submitted – Data submitted to the api endpoint
- Renvoie:
A form schema used to validate the submitted data
- on_delete()¶
- post()¶
HTTP POST api endpoint
- post_format(entry, edit, attributes)¶
Allows to apply post formatting to the model before flushing it
HTTP POST and PUT calls
- pre_delete()¶
- pre_format(datas, edit=False)¶
Allows to apply pre-formatting to the submitted datas
HTTP POST and PUT calls
- put()¶
HTTP PUT api endpoint
- schema = None¶
- class endi.views.BaseXlsView(*args, **kwargs)¶
Bases :
BaseCsvView- dbsession: <sqlalchemy.orm.scoping.scoped_session object at 0x7fe5b76f0350>¶
- request: Request¶
- session: <InterfaceClass pyramid.interfaces.ISession>¶
- writer¶
alias de
SqlaXlsExporter
- class endi.views.DeleteView(context, request=None)¶
Bases :
BaseView,PopupMixinDeletion view deletes the current context
Class Attributes
delete_msg
The message poped to the end user after the element is deleted
redirect_route
The name of the route we redirect after deletion
Following methods can be overriden if needed
on_before_delete
Run before the deletion
on_delete
Run after the object has been deleted
redirect
Data that will be returned by the view (default is HTTPFound but can also be json data)
class MyDeleteView(DeleteView): delete_msg = "L'élément a bien été supprimé" redirect_route = "templates"
- delete()¶
- delete_msg = "L'élément a bien été supprimé"¶
- on_before_delete()¶
- on_delete()¶
- redirect()¶
- redirect_route = None¶
- class endi.views.DisableView(context, request=None)¶
Bases :
BaseViewMain view for enabling/disabling elements
Support following attributes/methods
Attributes
enable_msg
Message flashed when enabled
disable_msg
Message flashed when disabled
redirect_route
The name of a route to redirect to
Methods
redirect
Return a dynamicallay created HTTPFound instance
on_disable
Launched on item disable
on_enable
Launched on item enable
- class MyDisableView(DisableView):
enable_msg = « Has been enabled » disabled_msg = « Has been disabled » redirect_route = « The route name »
- active_key = 'active'¶
- disable_msg = None¶
- enable_msg = None¶
- redirect_route = None¶
- class endi.views.DuplicateView(context, request=None)¶
Bases :
BaseViewBase Duplication view
calls the duplicate method on the view’s context flash a link to the duplicated item redirect to the redirect route
- Attr str route_name:
The route_name used to generate the link to the
duplication view (implement _link to override default generation)
- Attr str collection_route_name:
optionnal collection route name to which
redirect (default set to route_name + “s”), implement a _redirect method to override the redirection mechanism
- Attr str message:
The duplication message, take a single formatting value
(the link to the new item)
- collection_route_name = None¶
- message = None¶
- redirect(item)¶
Default redirect implementation
- Paramètres:
item (obj) – The newly created element (flushed)
- Renvoie:
The url to redirect to
- Type renvoyé:
- route_name = None¶
- class endi.views.JsAppViewMixin¶
Bases :
objectFor views having a JS app Using REST API requiring
Helps building AppOption JS object for JS app use a consistent way accross enDi.
Conventions: - context resource URL is given by context_url() implementation - form_config_url is context url + form_config=1 (this route has to exist)
Usage: - implement context_url() - call get_js_app_options() to build context with context_url/form_config_url keys - don’t forget to initialize AppOption object in your mako template.
- form_config_url()¶
- more_js_app_options()¶
Add options passed to the AppOption object
- class endi.views.PopupMixin¶
Bases :
objectProvide methods for handling popup related actions
- add_popup_response()¶
- Add custom response string to the request :
Pop message or Refresh parent page
regarding the options if a message was set in the queue, it’s shown with a refresh link else we fully reload the page
- class endi.views.RestListMixinClass(context, request=None)¶
Bases :
BaseListClassBase mixin for rest list views with pagination
It launches a query to retrieve records
Validates GET params regarding the given schema
filter the query with the provided filter_* methods
orders the query
sorts the query
- @param list_schema: Schema used to validate the GET params provided in the
url, the schema should inherit from endi.views.forms.lists.BaseListsSchema to preserve most of the processed automation list_schema can be either a callable or an instance
- @param sort_columns: dict of {“sort_column_key”:”sort_column”…}.
Allows to generate the validator for the sort availabilities and to automatically add a order_by clause to the query. sort_column may be equal to Table.attribute if join clauses are present in the main query.
@default_sort: the default sort_column_key to be used @default_direction: the default sort direction (one of [“asc”, “desc”])
you must implement method :
query()
Returns an iterable of items
you must implement property :
list_schema (see above)
you can implement methods
filter_*(self, query, appstruct)
Allows to provide several filters Should act on the query and returns it
_sort_by_<sort_key>(self, query, appstruct)
Handles sorting stuff if the given sort_key is used Should act on the query and returns it
format_collection(self, query)
Builds the data returned to the end user when calling the collection GET api endpoint
- collection_get()¶
Collection HTTP GET method endpoint
- dbsession: <sqlalchemy.orm.scoping.scoped_session object at 0x7fe5b76f0350>¶
- default_sort = None¶
- format_collection(query)¶
Format the collection returned to the end user
result of HTTP GET call on the collection endpoint
- get_list_schema()¶
- list_schema¶
alias de
BaseListsSchema
- request: Request¶
- session: <InterfaceClass pyramid.interfaces.ISession>¶
- sort_columns = {}¶
- class endi.views.TreeMixin¶
Bases :
objectMixin adding tree structure to views
- class MyView(BaseView, TreeMixin):
route_name = « /myviewroute »
Inherit from the TreeMixin and attach views to parent views
route_name
current route_name
children
class attribute in list format registering all view children
parent
weakref to the parent view
- classmethod add_child(view_class)¶
- property back_link¶
- property breadcrumb¶
- children = []¶
- description = ''¶
- classmethod get_back_url(request)¶
- classmethod get_breadcrumb(request, is_leaf=False)¶
Collect breadcrumb entries
- Paramètres:
request (obj) – The Pyramid request
is_leaf (bool) – Do we ask the leaf node
- Renvoie:
A generator of 2-uples (title, url)
- classmethod get_me_as_back_url(request)¶
Collect the back url pointing to the current view, ask the parent if needed
- classmethod get_title(request)¶
- classmethod get_url(request)¶
- parent_view = None¶
- route_name = None¶
- title = ''¶
- class endi.views.TreeMixinMetaClass(clsname, bases, attrs)¶
Bases :
typeMetaclasse qui attache un attribut children spécifique à chaque classe fille créée
LE problème d’origine :
- class A:
children = []
- class B(A):
pass
B.children.append(“o”) A.children [“o”]
Avec cette métaclasse
A.children = []
- endi.views.add_panel_page_view(config, panel_name, **kwargs)¶
- endi.views.add_panel_view(config, panel_name, **kwargs)¶
Add a panel view to the current configuration
- endi.views.add_tree_view_directive(config, *args, **kwargs)¶
Custom add view directive specific to views using the TreeMixin class It allows to pass a parent parameter matching the parent view
This way views can display a breadcrumb for navigation
- endi.views.endi_add_route(config, route_name, **kwargs)¶
Utility to add route, transforming the route name into a regex pattern.
- endi.views.get_page_url(request, page)¶
Page url generator to be used with webob.paginate’s tool
Note : default Webob pagination tool doesn’t respect query_params order and breaks mapping order, so we can’t preserve search params in list views
- endi.views.make_panel_wrapper_view(panel_name, js_resources=())¶
Return a view wrapping the given panel
- Paramètres:
panel_name (str) – The name of the panel
- endi.views.redirect_to_index_view(request, context)¶
Vue redirigeant l’utilisateur vers l’index d’enDI (utilisée lorsque l’on remappe les urls)