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 = []¶
- 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 = []¶
- 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 :
TaskSetMetadatasViewView 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 :
BaseEditViewView used to set treasury related informations
context
An invoice
perms
set_treasury.invoice
- 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).
- 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 :
TaskAddViewInvoice add view context is a project or company
- get_parent_link()¶
- title = 'Nouvelle facture'¶
- class endi.views.invoices.invoice.InvoiceAdminView(context, request=None)¶
Bases :
BaseEditViewVue pour l’administration de factures /invoices/id/admin
Vue accessible aux utilisateurs admin
- dbsession: DBSESSION¶
- 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
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>, <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()¶
- 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 = []¶
- 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 :
TaskSetMetadatasViewView 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 :
BaseEditViewView used to set treasury related informations
context
An invoice
perms
set_treasury.invoice
- 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).
- dbsession: DBSESSION¶
- 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:
State’s callback
- state_manager_key = 'status'¶
- validate()¶
- class endi.views.invoices.rest_api.InvoiceAddRestView(context, request=None)¶
Bases :
TaskAddRestViewInvoice 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¶
- request: Request¶
- session: ISession¶
- class endi.views.invoices.rest_api.InvoiceRestView(context, request=None)¶
Bases :
TaskRestView- dbsession: DBSESSION¶
- 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
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)¶