endi.views.price_study package

Submodules

endi.views.price_study.rest_api module

class endi.views.price_study.rest_api.RestPriceStudyChapterView(context, request=None)

Bases : BaseRestView

Chapter rest api view

after_flush(entry: PriceStudyChapter, edit: bool, attributes: dict)

Run after flushing modification to entry

collection_get()
dbsession: DBSESSION
on_delete()
post_format(entry: PriceStudyChapter, edit: bool, attributes: dict)

Associate a newly created element to the parent task

request: Request
schema = <colanderalchemy.schema.SQLAlchemySchemaNode object at 140624094504720 (named )>
session: ISession
class endi.views.price_study.rest_api.RestPriceStudyDiscountView(context, request=None)

Bases : BaseRestView

after_flush(entry, edit, attributes)

Ensure the current edited context (and its related) keep coherent values

If we’re adding an element based on an existing catalog element, we also attach respective PriceStudyWorkItem

Paramètres:
  • entry (obj) – the new Product instance

  • edit (bool) – Are we editing ?

  • attributes (dict) – The submitted attributes

collection_get()
dbsession: DBSESSION
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

on_delete()
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

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

Bases : BaseRestView

after_flush(entry: BasePriceStudyProduct, edit: bool, attributes: dict)

Ensure the current edited context (and its related) keep coherent values

If we’re adding an element based on an existing catalog element, we also attach respective PriceStudyWorkItem

Paramètres:
  • entry (obj) – the new Product instance

  • edit (bool) – Are we editing ?

  • attributes (dict) – The submitted attributes

collection_get()
dbsession: DBSESSION
duplicate_view()
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

load_from_catalog_view()
on_delete()
post_format(entry: BasePriceStudyProduct, edit: bool, attributes: dict)

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

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

Bases : BaseRestView

Rest service for Price studies, only provide item access

after_flush(entry, edit, attributes)

Allows to modify datas after the main entry was flushed

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

dbsession: DBSESSION
margin_rate_reset_view()

View handling the margin rate reset on the whole document

request: Request
schema = <colanderalchemy.schema.SQLAlchemySchemaNode object at 140624094139600 (named )>
session: ISession
class endi.views.price_study.rest_api.RestWorkItemView(context, request=None)

Bases : BaseRestView

Json api for Work Items

Collection views have a PriceStudyWork context

Context views have a PriceStudyWorkItem context

after_flush(entry, edit, attributes)

Keep data integrity, launches several computations if needed

collection_get()
dbsession: DBSESSION
duplicate_view()
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

load_from_catalog_view()
on_delete()
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

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

endi.views.price_study.routes module

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

endi.views.price_study.utils module

endi.views.price_study.utils.get_price_study_api_urls(request, price_study)

Build urls used to access price_study element

Type renvoyé:

dict

Module contents

endi.views.price_study.includeme(config)