endi.views.third_party.supplier package

Submodules

endi.views.third_party.supplier.base module

endi.views.third_party.supplier.base.get_supplier_form(request, counter=None)

Returns the supplier add/edit form :param obj request: Pyramid’s request object :param obj counter: An iterator for field number generation :returns: a deform.Form instance

endi.views.third_party.supplier.layout module

class endi.views.third_party.supplier.layout.SupplierLayout(context, request)

Bases : object

property docs_menu
endi_version = '2024.1.0b1'
endi.views.third_party.supplier.layout.includeme(config)

endi.views.third_party.supplier.lists module

Supplier views

class endi.views.third_party.supplier.lists.SuppliersCsv(*args, **kwargs)

Bases : SuppliersListTools, BaseCsvView

Supplier csv view

dbsession: DBSESSION
property filename

To be implemented by the subclass

model

alias de Supplier

query()

The main query, should be overrided by a subclass

request: Request
session: ISession
class endi.views.third_party.supplier.lists.SuppliersListTools

Bases : object

Supplier list tools

default_direction = 'desc'
default_sort = 'created_at'
filter_archived(query, appstruct)
filter_internal(query, appstruct)
filter_name_or_contact(records, appstruct)

Filter the records by supplier name or contact lastname

query()
schema = <endi.forms.lists.BaseListsSchema object at 140624065726032 (named )>
sort_columns = {'code': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'company_name': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'created_at': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'label': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}
title = 'Liste des fournisseurs'
class endi.views.third_party.supplier.lists.SuppliersListView(*args, **kwargs)

Bases : SuppliersListTools, BaseListView

Supplier listing view

add_template_vars = ('stream_actions', 'title', 'forms')
property forms
stream_actions(supplier)

Return action buttons with permission handling

endi.views.third_party.supplier.lists.includeme(config)

endi.views.third_party.supplier.rest_api module

class endi.views.third_party.supplier.rest_api.SupplierRestView(context, request=None)

Bases : BaseRestView

Supplier rest view

collection : context Root

GET : return list of suppliers (company_id should be provided)

collection_get()
dbsession: DBSESSION
form_config()
get_schema(submitted)

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

post_format(entry, edit, attributes)

Associate a newly created element to the parent company

request: Request
session: ISession
endi.views.third_party.supplier.rest_api.includeme(config)

endi.views.third_party.supplier.routes module

endi.views.third_party.supplier.routes.includeme(config)

endi.views.third_party.supplier.supplier module

Module contents

endi.views.third_party.supplier.includeme(config)