Esempio n. 1
0
def includeme(config):
    add_routes(config)

    config.add_view(EstimationAddView,
                    route_name=PROJECT_ITEM_ESTIMATION_ROUTE,
                    renderer='tasks/add.mako',
                    permission='add_estimation',
                    request_param="action=add",
                    layout="default")

    config.add_view(
        EstimationEditView,
        route_name='/estimations/{id}',
        renderer='tasks/form.mako',
        permission='view.estimation',
        layout='opa',
    )

    config.add_view(
        EstimationDeleteView,
        route_name='/estimations/{id}/delete',
        permission='delete.estimation',
    )

    config.add_view(
        EstimationAdminView,
        route_name='/estimations/{id}/admin',
        renderer="base/formpage.mako",
        permission="admin",
    )

    config.add_view(
        EstimationDuplicateView,
        route_name="/estimations/{id}/duplicate",
        permission="duplicate.estimation",
        renderer='tasks/add.mako',
    )
    config.add_view(
        EstimationHtmlView,
        route_name="/estimations/{id}.html",
        renderer='tasks/estimation_view_only.mako',
        permission='view.estimation',
    )
    add_panel_page_view(
        config,
        'estimation_html',
        js_resources=(task_html_pdf_css, ),
        route_name="/estimations/{id}.preview",
        permission='view.estimation',
    )

    config.add_view(
        EstimationPdfView,
        route_name='/estimations/{id}.pdf',
        permission='view.estimation',
    )

    config.add_view(
        FileUploadView,
        route_name="/estimations/{id}/addfile",
        renderer='base/formpage.mako',
        permission='add.file',
    )

    config.add_view(
        estimation_geninv_view,
        route_name="/estimations/{id}/geninv",
        permission='geninv.estimation',
    )

    config.add_view(
        estimation_genbusiness_view,
        route_name="/estimations/{id}/genbusiness",
        permission='genbusiness.estimation',
    )

    config.add_view(
        EstimationSetMetadatasView,
        route_name="/estimations/{id}/set_metadatas",
        permission='view.estimation',
        renderer='tasks/add.mako',
    )
    config.add_view(
        TaskMoveToPhaseView,
        route_name="/estimations/{id}/move",
        permission='view.estimation',
    )
    config.add_view(
        TaskSetDraftView,
        route_name="/estimations/{id}/set_draft",
        permission="draft.estimation",
    )

    config.add_view(
        EstimationAttachInvoiceView,
        route_name="/estimations/{id}/attach_invoices",
        permission='view.estimation',
        renderer="/base/formpage.mako",
    )
Esempio n. 2
0
def includeme(config):
    add_routes(config)

    # Here it's only view.cancelinvoice to allow redirection to the html view
    config.add_tree_view(
        CancelInvoiceEditView,
        parent=BusinessOverviewView,
        renderer="tasks/form.mako",
        permission='view.cancelinvoice',
    )

    config.add_view(
        CancelInvoiceAdminView,
        route_name='/cancelinvoices/{id}/admin',
        renderer="base/formpage.mako",
        request_param="token=admin",
        permission="admin",
    )

    config.add_view(
        CancelInvoiceDeleteView,
        route_name='/cancelinvoices/{id}/delete',
        permission='delete.cancelinvoice',
    )

    config.add_view(
        CancelInvoicePdfView,
        route_name='/cancelinvoices/{id}.pdf',
        permission='view.cancelinvoice',
    )

    config.add_tree_view(
        CancelInvoiceHtmlView,
        parent=BusinessOverviewView,
        renderer='tasks/cancelinvoice_view_only.mako',
        permission='view.cancelinvoice',
    )

    add_panel_page_view(
        config,
        'cancelinvoice_html',
        js_resources=(task_html_pdf_css, ),
        route_name='/cancelinvoices/{id}.preview',
        permission="view.cancelinvoice",
    )

    config.add_view(
        FileUploadView,
        route_name='/cancelinvoices/{id}/addfile',
        renderer='base/formpage.mako',
        permission='edit.cancelinvoice',
    )

    config.add_view(
        CancelInvoiceSetTreasuryiew,
        route_name="/cancelinvoices/{id}/set_treasury",
        renderer='base/formpage.mako',
        permission="set_treasury.cancelinvoice",
    )
    config.add_view(
        CancelInvoiceSetMetadatasView,
        route_name="/cancelinvoices/{id}/set_metadatas",
        renderer='tasks/add.mako',
        permission="view.cancelinvoice",
    )
    config.add_view(
        TaskSetDraftView,
        route_name="/cancelinvoices/{id}/set_draft",
        permission="draft.cancelinvoice",
    )
    config.add_view(
        CancelInvoiceSetProductsView,
        route_name="/cancelinvoices/{id}/set_products",
        permission="set_treasury.cancelinvoice",
        renderer='base/formpage.mako',
    )
    config.add_view(
        TaskMoveToPhaseView,
        route_name="/cancelinvoices/{id}/move",
        permission="view.cancelinvoice",
    )
Esempio n. 3
0
def includeme(config):
    add_routes(config)

    config.add_view(InvoiceAddView,
                    route_name=PROJECT_ITEM_INVOICE_ROUTE,
                    renderer='tasks/add.mako',
                    permission='add_invoice',
                    request_param="action=add",
                    layout='default')

    config.add_tree_view(
        InvoiceEditView,
        parent=BusinessOverviewView,
        renderer='tasks/form.mako',
        permission='view.invoice',
        layout='opa',
    )

    config.add_view(
        InvoiceDeleteView,
        route_name='/invoices/{id}/delete',
        permission='delete.invoice',
    )

    config.add_view(
        InvoiceAdminView,
        route_name='/invoices/{id}/admin',
        renderer="base/formpage.mako",
        permission="admin",
    )

    config.add_view(
        InvoiceDuplicateView,
        route_name="/invoices/{id}/duplicate",
        permission="duplicate.invoice",
        renderer='tasks/add.mako',
    )

    config.add_tree_view(
        InvoiceHtmlView,
        parent=BusinessOverviewView,
        renderer='tasks/invoice_view_only.mako',
        permission='view.invoice',
    )

    add_panel_page_view(
        config,
        'invoice_html',
        js_resources=(task_html_pdf_css, ),
        route_name='/invoices/{id}.preview',
        permission="view.invoice",
    )

    config.add_view(
        InvoicePdfView,
        route_name='/invoices/{id}.pdf',
        permission='view.invoice',
    )

    config.add_view(
        FileUploadView,
        route_name="/invoices/{id}/addfile",
        renderer='base/formpage.mako',
        permission='add.file',
    )

    config.add_view(
        gencinv_view,
        route_name="/invoices/{id}/gencinv",
        permission="gencinv.invoice",
    )

    config.add_view(
        InvoicePaymentView,
        route_name="/invoices/{id}/addpayment",
        permission="add_payment.invoice",
        renderer='base/formpage.mako',
    )

    config.add_view(
        InvoiceSetTreasuryiew,
        route_name="/invoices/{id}/set_treasury",
        permission="set_treasury.invoice",
        renderer='base/formpage.mako',
    )
    config.add_view(
        InvoiceSetMetadatasView,
        route_name="/invoices/{id}/set_metadatas",
        permission="view.invoice",
        renderer='tasks/add.mako',
    )
    config.add_view(
        TaskSetDraftView,
        route_name="/invoices/{id}/set_draft",
        permission="draft.invoice",
    )

    config.add_view(
        InvoiceSetProductsView,
        route_name="/invoices/{id}/set_products",
        permission="set_treasury.invoice",
        renderer='base/formpage.mako',
    )
    config.add_view(
        InvoiceAttachEstimationView,
        route_name="/invoices/{id}/attach_estimation",
        permission="view.invoice",
        renderer='base/formpage.mako',
    )
    config.add_view(
        TaskMoveToPhaseView,
        route_name="/invoices/{id}/move",
        permission="view.invoice",
    )
Esempio n. 4
0
def includeme(config):
    add_routes(config)

    config.add_view(
        InvoiceAddView,
        route_name=PROJECT_ITEM_INVOICE_ROUTE,
        renderer='tasks/add.mako',
        permission='add_invoice',
        request_param="action=add",
        layout='default'
    )

    config.add_tree_view(
        InvoiceEditView,
        parent=BusinessOverviewView,
        renderer='tasks/form.mako',
        permission='view.invoice',
        layout='opa',
    )

    config.add_view(
        InvoiceDeleteView,
        route_name='/invoices/{id}/delete',
        permission='delete.invoice',
    )

    config.add_view(
        InvoiceAdminView,
        route_name='/invoices/{id}/admin',
        renderer="base/formpage.mako",
        permission="admin",
    )

    config.add_view(
        InvoiceDuplicateView,
        route_name="/invoices/{id}/duplicate",
        permission="duplicate.invoice",
        renderer='tasks/add.mako',
    )

    config.add_tree_view(
        InvoiceHtmlView,
        parent=BusinessOverviewView,
        renderer='tasks/invoice_view_only.mako',
        permission='view.invoice',
    )

    add_panel_page_view(
        config,
        'invoice_html',
        js_resources=(task_html_pdf_css,),
        route_name='/invoices/{id}.preview',
        permission="view.invoice",
    )

    config.add_view(
        InvoicePdfView,
        route_name='/invoices/{id}.pdf',
        permission='view.invoice',
    )

    config.add_view(
        FileUploadView,
        route_name="/invoices/{id}/addfile",
        renderer='base/formpage.mako',
        permission='add.file',
    )

    config.add_view(
        gencinv_view,
        route_name="/invoices/{id}/gencinv",
        permission="gencinv.invoice",
    )

    config.add_view(
        InvoicePaymentView,
        route_name="/invoices/{id}/addpayment",
        permission="add_payment.invoice",
        renderer='base/formpage.mako',
    )

    config.add_view(
        InvoiceSetTreasuryiew,
        route_name="/invoices/{id}/set_treasury",
        permission="set_treasury.invoice",
        renderer='base/formpage.mako',
    )
    config.add_view(
        InvoiceSetMetadatasView,
        route_name="/invoices/{id}/set_metadatas",
        permission="view.invoice",
        renderer='tasks/add.mako',
    )
    config.add_view(
        TaskSetDraftView,
        route_name="/invoices/{id}/set_draft",
        permission="draft.invoice",
    )

    config.add_view(
        InvoiceSetProductsView,
        route_name="/invoices/{id}/set_products",
        permission="set_treasury.invoice",
        renderer='base/formpage.mako',
    )
    config.add_view(
        InvoiceAttachEstimationView,
        route_name="/invoices/{id}/attach_estimation",
        permission="view.invoice",
        renderer='base/formpage.mako',
    )
    config.add_view(
        TaskMoveToPhaseView,
        route_name="/invoices/{id}/move",
        permission="view.invoice",
    )