tailbone.api.batch.ordering
¶
Tailbone Web API - Ordering Batches
These views expose the basic CRUD interface to “ordering” batches, for the web API.
- class tailbone.api.batch.ordering.OrderingBatchViews(request, **kwargs)[source]¶
- collection_url_prefix = '/ordering-batches'¶
- object_url_prefix = '/ordering-batch'¶
- model_class = <class 'rattail.db.model.batch.purchase.PurchaseBatch'>¶
- route_prefix = 'orderingbatchviews'¶
- permission_prefix = 'ordering'¶
- default_handler_spec = 'rattail.batch.purchase:PurchaseBatchHandler'¶
- class tailbone.api.batch.ordering.OrderingBatchRowViews(request, **kwargs)[source]¶
- collection_url_prefix = '/ordering-batch-rows'¶
- object_url_prefix = '/ordering-batch-row'¶
- model_class = <class 'rattail.db.model.batch.purchase.PurchaseBatchRow'>¶
- route_prefix = 'ordering.rows'¶
- permission_prefix = 'ordering'¶
- default_handler_spec = 'rattail.batch.purchase:PurchaseBatchHandler'¶
- supports_quick_entry = True¶
- update_object(row, data)[source]¶
Overrides the default logic as follows:
So far, we only allow updating the
cases_ordered
and/orunits_ordered
quantities; thereforedata
should have one or both of those keys.This data is then passed to the
update_row_quantity()
method of the batch handler.Note that the “normal” logic for this method is not invoked at all.