endi.views.invoices package

Submodules

endi.views.invoices.cancelinvoice module

View for assets

class endi.views.invoices.cancelinvoice.CancelInvoiceAccountingView(context, request=None)

Bases : InvoiceAccountingView

children = []
route_name = '/cancelinvoices/{id}/accounting'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.cancelinvoice.CancelInvoiceAdminView(context, request=None)

Bases : BaseEditView

dbsession: DBSESSION
factory

alias de CancelInvoice

request: Request
schema = <colanderalchemy.schema.SQLAlchemySchemaNode object at 140624216582288 (named )>

Colander schema instance to be used to create the form instance. Provide your schema in your derived class.

session: ISession
class endi.views.invoices.cancelinvoice.CancelInvoiceDeleteView(context, request=None)

Bases : InvoiceDeleteView

dbsession: DBSESSION
msg = "L'avoir {context.name} a bien été supprimé."
request: Request
session: ISession
class endi.views.invoices.cancelinvoice.CancelInvoiceEditView(context, request=None)

Bases : TaskEditView

children = []
get_js_app_options() dict
route_name = '/cancelinvoices/{id}'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.cancelinvoice.CancelInvoiceFilesView(context, request=None)

Bases : TaskFilesView

children = []
route_name = '/cancelinvoices/{id}/files'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.cancelinvoice.CancelInvoiceGeneralView(context, request=None)

Bases : TaskGeneralView

children = []
file_route_name: str = '/cancelinvoices/{id}/files'
route_name: str = '/cancelinvoices/{id}/general'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.cancelinvoice.CancelInvoicePdfView(context, request=None)

Bases : TaskPdfView

class endi.views.invoices.cancelinvoice.CancelInvoicePreviewView(context, request=None)

Bases : TaskPreviewView

children = []
route_name = '/cancelinvoices/{id}/preview'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.cancelinvoice.CancelInvoiceSetMetadatasView(context, request=None)

Bases : TaskSetMetadatasView

View used for editing invoice metadatas

dbsession: DBSESSION
request: Request
session: ISession
property title
class endi.views.invoices.cancelinvoice.CancelInvoiceSetProductsView(context, request=None)

Bases : TaskSetProductsView

dbsession: DBSESSION
request: Request
session: ISession
property title
class endi.views.invoices.cancelinvoice.CancelInvoiceSetTreasuryiew(context, request=None)

Bases : BaseEditView

View used to set treasury related informations

context

An invoice

perms

set_treasury.invoice

before(form)

Performs some processing on the form prior 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).

dbsession: DBSESSION
factory

alias de CancelInvoice

redirect(appstruct)
request: Request
schema = <colanderalchemy.schema.SQLAlchemySchemaNode object at 140624216674512 (named )>

Colander schema instance to be used to create the form instance. Provide your schema in your derived class.

session: ISession
property title
endi.views.invoices.cancelinvoice.add_routes(config)

Add module related routes

endi.views.invoices.cancelinvoice.get_title(invoice)
endi.views.invoices.cancelinvoice.includeme(config)

endi.views.invoices.invoice module

Invoice views

class endi.views.invoices.invoice.InvoiceAccountingView(context, request=None)

Bases : BaseView, BaseTaskHtmlTreeMixin

children = []
route_name = '/invoices/{id}/accounting'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.invoice.InvoiceAddView(context, request=None)

Bases : TaskAddView

Invoice add view context is a project or company

factory

alias de Invoice

get_api_url(_query: dict = {}) str
title = 'Nouvelle facture'
class endi.views.invoices.invoice.InvoiceAdminView(context, request=None)

Bases : BaseEditView

Vue pour l’administration de factures /invoices/id/admin

Vue accessible aux utilisateurs admin

dbsession: DBSESSION
factory

alias de Invoice

request: Request
schema = <colanderalchemy.schema.SQLAlchemySchemaNode object at 140624295267280 (named )>

Colander schema instance to be used to create the form instance. Provide your schema in your derived class.

session: ISession
class endi.views.invoices.invoice.InvoiceAttachEstimationView(context, request=None)

Bases : BaseFormView

before(form)

Performs some processing on the form prior 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>, <deform.form.Button object>)

Tuple of buttons or strings to pass to the form instance. Override in your derived class.

cancel_failure(appstruct)
cancel_success(appstruct)
dbsession: DBSESSION
redirect()
request: Request
schema

alias de EstimationAttachSchema

session: ISession
submit_success(appstruct)
class endi.views.invoices.invoice.InvoiceDeleteView(context, request=None)

Bases : TaskDeleteView

dbsession: DBSESSION
msg = 'La facture {context.name} a bien été supprimée.'
on_delete()
pre_delete()

If an estimation is attached to this invoice, ensure geninv is set to False

redirect()

Return a redirect url after task deletion

request: Request
session: ISession
class endi.views.invoices.invoice.InvoiceDuplicateView(context, request=None)

Bases : TaskDuplicateView

dbsession: DBSESSION
property label
request: Request
session: ISession
class endi.views.invoices.invoice.InvoiceEditView(context, request=None)

Bases : TaskEditView

children = []
discount_api_url()
get_js_app_options() dict
post_ttc_api_url()
route_name = '/invoices/{id}'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.invoice.InvoiceFilesView(context, request=None)

Bases : TaskFilesView

children = []
route_name = '/invoices/{id}/files'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.invoice.InvoiceGeneralView(context, request=None)

Bases : TaskGeneralView

children = []
file_route_name: str = '/invoices/{id}/files'
route_name: str = '/invoices/{id}/general'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.invoice.InvoicePaymentView(context, request=None)

Bases : BaseView, BaseTaskHtmlTreeMixin

children = []
route_name = '/invoices/{id}/payment'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.invoice.InvoicePdfView(context, request=None)

Bases : TaskPdfView

class endi.views.invoices.invoice.InvoicePreviewView(context, request=None)

Bases : TaskPreviewView

children = []
route_name = '/invoices/{id}/preview'
property title

str(object=””) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to “strict”.

class endi.views.invoices.invoice.InvoiceSetMetadatasView(context, request=None)

Bases : TaskSetMetadatasView

View used for editing invoice metadatas

dbsession: DBSESSION
request: Request
session: ISession
property title
class endi.views.invoices.invoice.InvoiceSetProductsView(context, request=None)

Bases : TaskSetProductsView

dbsession: DBSESSION
request: Request
session: ISession
property title
class endi.views.invoices.invoice.InvoiceSetTreasuryiew(context, request=None)

Bases : BaseEditView

View used to set treasury related informations

context

An invoice

perms

set_treasury.invoice

before(form)

Performs some processing on the form prior 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).

dbsession: DBSESSION
factory

alias de Invoice

redirect(appstruct)
request: Request
schema = <colanderalchemy.schema.SQLAlchemySchemaNode object at 140624296257168 (named )>

Colander schema instance to be used to create the form instance. Provide your schema in your derived class.

session: ISession
property title
endi.views.invoices.invoice.add_routes(config)

add module related routes

endi.views.invoices.invoice.gencinv_view(context, request)

Cancelinvoice generation view

endi.views.invoices.invoice.get_title(invoice)
endi.views.invoices.invoice.includeme(config)

endi.views.invoices.lists module

endi.views.invoices.rest_api module

Rest views for invoices and cancelinvoices

class endi.views.invoices.rest_api.CancelInvoiceRestView(context, request=None)

Bases : TaskRestView

dbsession: DBSESSION
factory

alias de CancelInvoice

get_schema(submitted)

Return the schema for CancelInvoice add/edition

Paramètres:

submitted (dict) – The submitted datas

Renvoie:

A colander.Schema

request: Request
session: ISession
class endi.views.invoices.rest_api.CancelInvoiceStatusRestView(context, request=None)

Bases : TaskStatusView

get_parent_url()
post_valid_process(status, params)

Launched after the status is set to valid

Paramètres:
  • status (str) – The new status that should be affected

  • params (dict) – The params that were transmitted by the associated

State’s callback

state_manager_key = 'status'
validate()
class endi.views.invoices.rest_api.InvoiceAddRestView(context, request=None)

Bases : TaskAddRestView

Invoice Add Rest View, Company is the current context

GET /api/v1/companies/(company_id)/invoices/add?form_config=1

Returns configuration informations for Invoice add form

Paramètres de requête:
  • int – company_id (required) – The id of the company

POST /api/v1/companies/(company_id)/invoices/add

Add a new invoice

Paramètres de requête:
  • int – company_id (required) – The if of the company

dbsession: DBSESSION
factory

alias de Invoice

request: Request
session: ISession
class endi.views.invoices.rest_api.InvoiceRestView(context, request=None)

Bases : TaskRestView

dbsession: DBSESSION
factory

alias de Invoice

get_schema(submitted)

Return the schema for Invoice add/edition

Paramètres:

submitted (dict) – The submitted datas

Renvoie:

A colander.Schema

post_format(entry, edit, attributes)

Allows to apply post formatting to the model before flushing it

HTTP POST and PUT calls

Paramètres:
  • entry – The instance added/edited

  • edit (bool) – Is it an edition view ?

  • attributes (dict) – The validated submitted data

related_estimation()

Collect data about a related estimation(s)

request: Request
session: ISession
class endi.views.invoices.rest_api.InvoiceStatusRestView(context, request=None)

Bases : TaskStatusView

get_parent_url()
state_manager_key = 'status'
validate()
static validation_function(invoice_object: Invoice, request)

Globally validate an invoice_object

Paramètres:
  • invoice_object (obj) – An instance of Invoice

  • request (obj) – The pyramid request

Raises:

colander.Invalid

try:

validate_invoice(est, self.request)

except colander.Invalid as err:

error_messages = err.messages

endi.views.invoices.rest_api.add_cancelinvoice_routes(config)

Add routes specific to cancelinvoices edition

Paramètres:

config (obj) – Pyramid config object

endi.views.invoices.rest_api.add_cancelinvoice_views(config)

Add cancelinvoice related views to the current configuration

Paramètres:

config (obj) – The current Pyramid configuration

endi.views.invoices.rest_api.add_invoice_routes(config)

Add invoice rest related routes to the current configuration

Paramètres:

config (obj) – Pyramid config object

endi.views.invoices.rest_api.add_invoice_views(config)

Add Invoice related views to the current configuration

endi.views.invoices.rest_api.includeme(config)

endi.views.invoices.routes module

endi.views.invoices.routes.includeme(config)

Module contents

endi.views.invoices.includeme(config)