shoop.admin.modules.orders.views package

Submodules

shoop.admin.modules.orders.views.detail module

class shoop.admin.modules.orders.views.detail.OrderDetailView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Order

template_name = 'shoop/admin/orders/detail.jinja'
context_object_name = 'order'
get_toolbar()[source]
get_context_data(**kwargs)[source]
class shoop.admin.modules.orders.views.detail.OrderSetStatusView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Order

get(request, *args, **kwargs)[source]
post(request, *args, **kwargs)[source]

shoop.admin.modules.orders.views.edit module

shoop.admin.modules.orders.views.edit.create_order_from_state(state, **kwargs)[source]
shoop.admin.modules.orders.views.edit.update_order_from_state(state, order_to_update, **kwargs)[source]
shoop.admin.modules.orders.views.edit.create_source_from_state(state, **kwargs)[source]
shoop.admin.modules.orders.views.edit.encode_address(address)[source]
shoop.admin.modules.orders.views.edit.encode_shop(shop)[source]
shoop.admin.modules.orders.views.edit.encode_method(method)[source]
shoop.admin.modules.orders.views.edit.encode_line(line)[source]
shoop.admin.modules.orders.views.edit.get_line_data_for_edit(shop, line)[source]
shoop.admin.modules.orders.views.edit.get_price_info(shop, customer, product, quantity)[source]

Get price info of given product for given context parameters.

class shoop.admin.modules.orders.views.edit.OrderEditView(**kwargs)[source]

Bases: shoop.admin.utils.views.CreateOrUpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Order

template_name = 'shoop/admin/orders/create.jinja'
context_object_name = 'order'
title = 'Create Order'
fields = []
get_context_data(**kwargs)[source]
get_toolbar()[source]
get_config()[source]
get_initial_order_data()[source]
get_customer_data(customer_id)[source]
dispatch(request, *args, **kwargs)[source]
dispatch_command(request)[source]
handle_product_data(request)[source]
handle_customer_data(request)[source]
handle_customer_details(request)[source]
handle_source_data(request)[source]
handle_finalize(request)[source]

shoop.admin.modules.orders.views.list module

class shoop.admin.modules.orders.views.list.OrderListView(**kwargs)[source]

Bases: shoop.admin.utils.views.PicotableListView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Order

columns = [<shoop.admin.utils.picotable.Column object at 0x7f5302ee6198>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee6c88>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee6be0>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee8a90>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee8518>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee8780>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee8e48>]
get_queryset()[source]
format_order_date(instance, *args, **kwargs)[source]
format_taxful_total_price(instance, *args, **kwargs)[source]
get_object_abstract(instance, item)[source]

shoop.admin.modules.orders.views.log module

class shoop.admin.modules.orders.views.log.NewLogEntryView(**kwargs)[source]

Bases: django.views.generic.base.View

Create a log note item associated with a particular order.

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

post(request, *args, **kwargs)[source]

shoop.admin.modules.orders.views.payment module

class shoop.admin.modules.orders.views.payment.OrderCreatePaymentView(**kwargs)[source]

Bases: django.views.generic.edit.UpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Order

template_name = 'shoop/admin/orders/create_payment.jinja'
context_object_name = 'order'
form_class

alias of Form

get_context_data(**kwargs)[source]
get_form_kwargs()[source]
get_form(form_class=None)
form_invalid(form)[source]
form_valid(form)[source]

shoop.admin.modules.orders.views.refund module

class shoop.admin.modules.orders.views.refund.RefundForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False)[source]

Bases: django.forms.forms.Form

clean_line_number()[source]
clean_quantity()[source]
clean_amount()[source]
base_fields = OrderedDict([('line_number', <django.forms.fields.ChoiceField object at 0x7f5302ee88d0>), ('quantity', <django.forms.fields.DecimalField object at 0x7f5302ee8668>), ('amount', <django.forms.fields.DecimalField object at 0x7f5302ee4ef0>), ('restock_products', <django.forms.fields.BooleanField object at 0x7f5302ee4080>)])
declared_fields = OrderedDict([('line_number', <django.forms.fields.ChoiceField object at 0x7f5302ee88d0>), ('quantity', <django.forms.fields.DecimalField object at 0x7f5302ee8668>), ('amount', <django.forms.fields.DecimalField object at 0x7f5302ee4ef0>), ('restock_products', <django.forms.fields.BooleanField object at 0x7f5302ee4080>)])
media
class shoop.admin.modules.orders.views.refund.OrderCreateRefundView(**kwargs)[source]

Bases: django.views.generic.edit.UpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Order

template_name = 'shoop/admin/orders/create_refund.jinja'
context_object_name = 'order'
form_class

alias of RefundFormFormSet

get_context_data(**kwargs)[source]
get_form_kwargs()[source]
get_form(form_class=None)
form_valid(form)[source]
class shoop.admin.modules.orders.views.refund.FullRefundConfirmationForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False)[source]

Bases: django.forms.forms.Form

base_fields = OrderedDict([('restock_products', <django.forms.fields.BooleanField object at 0x7f53030b8550>)])
declared_fields = OrderedDict([('restock_products', <django.forms.fields.BooleanField object at 0x7f53030b8550>)])
media
class shoop.admin.modules.orders.views.refund.OrderCreateFullRefundView(**kwargs)[source]

Bases: django.views.generic.edit.UpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Order

template_name = 'shoop/admin/orders/create_full_refund.jinja'
context_object_name = 'order'
form_class

alias of FullRefundConfirmationForm

get_context_data(**kwargs)[source]
get_form_kwargs()[source]
form_valid(form)[source]

shoop.admin.modules.orders.views.shipment module

class shoop.admin.modules.orders.views.shipment.ShipmentFormModifier[source]

Bases: object

get_extra_fields(order)[source]

Extra fields for shipment creation view.

Parameters:order (shoop.core.models.Order) – Order linked to form
Returns:List of extra fields that should be added to form.

System Message: WARNING/2 (/home/docs/checkouts/readthedocs.org/user_builds/shuup/checkouts/stable/shoop/admin/modules/orders/views/shipment.py:docstring of shoop.admin.modules.orders.views.shipment.ShipmentFormModifier.get_extra_fields, line 6)

Field list ends without a blank line; unexpected unindent.

Tuple should contain field name and Django form field. :rtype: list[(str,django.forms.Field)]

clean_hook(form)[source]

Extra clean for shipment creation form.

This hook will be called in clean method of the form, after calling parent clean. Implementor of this hook may call add_error to add errors to form or modify the form.cleaned_data dictionary.

Parameters:form (ShipmentForm) – Form that is currently cleaned
Return type:None
form_valid_hook(form, shipment)[source]

Extra form valid handler for shipment creation view.

This is called from OrderCreateShipmentView just before the Order.create_shipment

Parameters:
Return type:

None

class shoop.admin.modules.orders.views.shipment.ShipmentForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False)[source]

Bases: django.forms.forms.Form

clean()[source]
base_fields = OrderedDict()
declared_fields = OrderedDict()
media
class shoop.admin.modules.orders.views.shipment.OrderCreateShipmentView(**kwargs)[source]

Bases: django.views.generic.edit.UpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Order

template_name = 'shoop/admin/orders/create_shipment.jinja'
context_object_name = 'order'
form_class

alias of ShipmentForm

get_context_data(**kwargs)[source]
get_form_kwargs()[source]
get_form(form_class=None)
form_invalid(form)[source]
form_valid(form)[source]

Module contents

class shoop.admin.modules.orders.views.NewLogEntryView(**kwargs)[source]

Bases: django.views.generic.base.View

Create a log note item associated with a particular order.

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

post(request, *args, **kwargs)[source]
class shoop.admin.modules.orders.views.OrderDetailView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

context_object_name = 'order'
get_context_data(**kwargs)[source]
get_toolbar()[source]
model

alias of Order

template_name = 'shoop/admin/orders/detail.jinja'
class shoop.admin.modules.orders.views.OrderEditView(**kwargs)[source]

Bases: shoop.admin.utils.views.CreateOrUpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

context_object_name = 'order'
dispatch(request, *args, **kwargs)[source]
dispatch_command(request)[source]
fields = []
get_config()[source]
get_context_data(**kwargs)[source]
get_customer_data(customer_id)[source]
get_initial_order_data()[source]
get_toolbar()[source]
handle_customer_data(request)[source]
handle_customer_details(request)[source]
handle_finalize(request)[source]
handle_product_data(request)[source]
handle_source_data(request)[source]
model

alias of Order

template_name = 'shoop/admin/orders/create.jinja'
title = 'Create Order'
class shoop.admin.modules.orders.views.OrderListView(**kwargs)[source]

Bases: shoop.admin.utils.views.PicotableListView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

columns = [<shoop.admin.utils.picotable.Column object at 0x7f5302ee6198>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee6c88>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee6be0>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee8a90>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee8518>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee8780>, <shoop.admin.utils.picotable.Column object at 0x7f5302ee8e48>]
format_order_date(instance, *args, **kwargs)[source]
format_taxful_total_price(instance, *args, **kwargs)[source]
get_object_abstract(instance, item)[source]
get_queryset()[source]
model

alias of Order

class shoop.admin.modules.orders.views.OrderCreatePaymentView(**kwargs)[source]

Bases: django.views.generic.edit.UpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

context_object_name = 'order'
form_class

alias of Form

form_invalid(form)[source]
form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form(form_class=None)
get_form_kwargs()[source]
model

alias of Order

template_name = 'shoop/admin/orders/create_payment.jinja'
class shoop.admin.modules.orders.views.OrderCreateFullRefundView(**kwargs)[source]

Bases: django.views.generic.edit.UpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

context_object_name = 'order'
form_class

alias of FullRefundConfirmationForm

form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form_kwargs()[source]
model

alias of Order

template_name = 'shoop/admin/orders/create_full_refund.jinja'
class shoop.admin.modules.orders.views.OrderCreateRefundView(**kwargs)[source]

Bases: django.views.generic.edit.UpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

context_object_name = 'order'
form_class

alias of RefundFormFormSet

form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form(form_class=None)
get_form_kwargs()[source]
model

alias of Order

template_name = 'shoop/admin/orders/create_refund.jinja'
class shoop.admin.modules.orders.views.OrderCreateShipmentView(**kwargs)[source]

Bases: django.views.generic.edit.UpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

context_object_name = 'order'
form_class

alias of ShipmentForm

form_invalid(form)[source]
form_valid(form)[source]
get_context_data(**kwargs)[source]
get_form(form_class=None)
get_form_kwargs()[source]
model

alias of Order

template_name = 'shoop/admin/orders/create_shipment.jinja'
class shoop.admin.modules.orders.views.OrderSetStatusView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

get(request, *args, **kwargs)[source]
model

alias of Order

post(request, *args, **kwargs)[source]