shoop.admin.modules.orders package

Submodules

shoop.admin.modules.orders.dashboard module

shoop.admin.modules.orders.dashboard.get_orders_by_currency(currency)[source]
class shoop.admin.modules.orders.dashboard.OrderValueChartDashboardBlock(id, currency, **kwargs)[source]

Bases: shoop.admin.dashboard.blocks.DashboardChartBlock

get_chart()[source]
shoop.admin.modules.orders.dashboard.get_subtitle(count)[source]
shoop.admin.modules.orders.dashboard.get_sales_of_the_day_block(request, currency)[source]
shoop.admin.modules.orders.dashboard.get_lifetime_sales_block(request, currency)[source]
shoop.admin.modules.orders.dashboard.get_avg_purchase_size_block(request, currency)[source]
shoop.admin.modules.orders.dashboard.get_open_orders_block(request, currency)[source]
shoop.admin.modules.orders.dashboard.get_order_value_chart_dashboard_block(request, currency)[source]

shoop.admin.modules.orders.json_order_creator module

class shoop.admin.modules.orders.json_order_creator.JsonOrderCreator[source]

Bases: object

static safe_get_first(model, **lookup)[source]
add_error(error)[source]
is_valid
errors
create_source_from_state(state, creator=None, save=False)[source]

Create an order source from a state dict unserialized from JSON.

Parameters:
  • state (dict) – State dictionary
  • creator (django.contrib.auth.models.User|None) – Creator user
  • save (boolean) – Flag whether order customer and addresses is saved to database
Returns:

The created order source, or None if something failed along the way

Return type:

OrderSource|None

create_order_from_state(state, creator=None)[source]

Create an order from a state dict unserialized from JSON.

Parameters:
  • state (dict) – State dictionary
  • creator (django.contrib.auth.models.User|None) – Creator user
Returns:

The created order, or None if something failed along the way

Return type:

Order|None

Module contents

class shoop.admin.modules.orders.OrderModule(currency=None, *args, **kwargs)[source]

Bases: shoop.admin.currencybound.CurrencyBound, shoop.admin.base.AdminModule

name = <django.utils.functional.lazy.<locals>.__proxy__ object>
breadcrumbs_menu_entry = <shoop.admin.base.MenuEntry object>
get_urls()[source]
get_menu_category_icons()[source]
get_menu_entries(request)[source]
get_search_results(request, query)[source]
get_dashboard_blocks(request)[source]
get_notifications(request)[source]
get_model_url(object, kind)[source]