shuup.admin.modules.orders.views package

Submodules

shuup.admin.modules.orders.views.addresses module

class shuup.admin.modules.orders.views.addresses.OrderAddressEditView(**kwargs)[source]

Bases: UpdateView

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

model

alias of Order

context_object_name = 'order'
template_name = 'shuup/admin/orders/_address_edit.jinja'
get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

form_valid(form)[source]

If the form is valid, save the associated model.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

shuup.admin.modules.orders.views.detail module

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

Bases: DetailView

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

model

alias of Order

template_name = 'shuup/admin/orders/detail.jinja'
context_object_name = 'order'
get_toolbar()[source]
get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_context_data(**kwargs)[source]

Insert the single object into the context dict.

class shuup.admin.modules.orders.views.detail.OrderSetStatusView(**kwargs)[source]

Bases: DetailView

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

model

alias of Order

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

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

shuup.admin.modules.orders.views.edit module

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

Get price info of given product for given context parameters.

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

Bases: CreateOrUpdateView

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

model

alias of Order

template_name = 'shuup/admin/orders/create.jinja'
context_object_name = 'order'
title = 'Create Order'
fields = []
get_context_data(**kwargs)[source]

Insert the form into the context dict.

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_customer_details(request)[source]
handle_customer_data(request)[source]
handle_product_data(request)[source]
get_request_body(request)[source]
handle_source_data(request)[source]
handle_finalize(request)[source]
class shuup.admin.modules.orders.views.edit.UpdateAdminCommentView(**kwargs)[source]

Bases: View

Update order’s admin comment.

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

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

shuup.admin.modules.orders.views.list module

class shuup.admin.modules.orders.views.list.OrderListView[source]

Bases: PicotableListView

model

alias of Order

default_columns = [<Column: Order> identifier, <Column: Order Date> order_date, <Column: Customer> customer, <Column: Status> status, <Column: Payment Status> payment_status, <Column: Shipping Status> shipping_status, <Column: Total, incl. tax> taxful_total_price_value, <Column: Total, excl. tax> taxless_total_price_value]
related_objects = [('shop', 'shuup.core.models:Shop'), ('billing_address', 'shuup.core.models:ImmutableAddress'), ('shipping_address', 'shuup.core.models:ImmutableAddress')]
mass_actions = ['shuup.admin.modules.orders.mass_actions:CancelOrderAction', 'shuup.admin.modules.orders.mass_actions:OrderConfirmationPdfAction', 'shuup.admin.modules.orders.mass_actions:OrderDeliveryPdfAction']
toolbar_buttons_provider_key: str | None = 'order_list_toolbar_provider'
mass_actions_provider_key: str | None = 'order_list_mass_actions_provider'
get_toolbar()[source]
get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

format_customer_name(instance, *args, **kwargs)[source]
format_order_date(instance, *args, **kwargs)[source]
format_taxful_total_price(instance, *args, **kwargs)[source]
format_taxless_total_price(instance, *args, **kwargs)[source]
label(instance, *args, **kwargs)[source]
get_object_abstract(instance, item)[source]

Get the object abstract lines (used for mobile layouts) for this object.

Supported keys in abstract line dicts are:

  • text (required)

  • title

  • class (CSS class name – header for instance)

  • raw (boolean; whether or not the text is raw HTML)

Parameters:
  • instance – The instance.

  • item – The item dict so far. Useful for reusing precalculated values.

Returns:

Iterable of dicts to pass through to the picotable javascript.

Return type:

Iterable[dict]

shuup.admin.modules.orders.views.log module

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

Bases: 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]

shuup.admin.modules.orders.views.payment module

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

Bases: UpdateView

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

model

alias of Order

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

alias of Form

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

form_invalid(form)[source]

If the form is invalid, render the invalid form.

form_valid(form)[source]

If the form is valid, save the associated model.

class shuup.admin.modules.orders.views.payment.OrderSetPaidView(**kwargs)[source]

Bases: DetailView

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

model

alias of Order

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get(request, *args, **kwargs)[source]
post(request, *args, **kwargs)[source]
class shuup.admin.modules.orders.views.payment.OrderDeletePaymentView(**kwargs)[source]

Bases: BaseDeleteView

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

model

alias of Order

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

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

Call the delete() method on the fetched object and then redirect to the success URL.

shuup.admin.modules.orders.views.refund module

class shuup.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, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: Form

clean_line_number()[source]
clean_quantity()[source]
clean_amount()[source]
base_fields = {'amount': <django.forms.fields.DecimalField object>, 'line_number': <django.forms.fields.ChoiceField object>, 'quantity': <django.forms.fields.DecimalField object>, 'restock_products': <django.forms.fields.BooleanField object>, 'text': <django.forms.fields.CharField object>}
declared_fields = {'amount': <django.forms.fields.DecimalField object>, 'line_number': <django.forms.fields.ChoiceField object>, 'quantity': <django.forms.fields.DecimalField object>, 'restock_products': <django.forms.fields.BooleanField object>, 'text': <django.forms.fields.CharField object>}
property media

Return all media required to render the widgets on this form.

class shuup.admin.modules.orders.views.refund.OrderCreateRefundView(**kwargs)[source]

Bases: UpdateView

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

model

alias of Order

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

alias of RefundFormFormSet

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

form_valid(form)[source]

If the form is valid, save the associated model.

class shuup.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, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: Form

base_fields = {'restock_products': <django.forms.fields.BooleanField object>}
declared_fields = {'restock_products': <django.forms.fields.BooleanField object>}
property media

Return all media required to render the widgets on this form.

class shuup.admin.modules.orders.views.refund.OrderCreateFullRefundView(**kwargs)[source]

Bases: UpdateView

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

model

alias of Order

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

alias of FullRefundConfirmationForm

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

form_valid(form)[source]

If the form is valid, save the associated model.

shuup.admin.modules.orders.views.shipment module

class shuup.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, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: ModifiableFormMixin, Form

form_modifier_provide_key = 'admin_extend_create_shipment_form'
base_fields = {'description': <django.forms.fields.CharField object>, 'tracking_code': <django.forms.fields.CharField object>, 'tracking_url': <django.forms.fields.URLField object>}
declared_fields = {'description': <django.forms.fields.CharField object>, 'tracking_code': <django.forms.fields.CharField object>, 'tracking_url': <django.forms.fields.URLField object>}
property media

Return all media required to render the widgets on this form.

class shuup.admin.modules.orders.views.shipment.OrderCreateShipmentView(**kwargs)[source]

Bases: ModifiableViewMixin, UpdateView

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

model

alias of Order

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

alias of ShipmentForm

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

form_invalid(form)[source]

If the form is invalid, render the invalid form.

create_shipment(order, product_quantities, shipment)[source]

This function exists so subclasses can implement custom logic without overriding the entire form_valid method.

Parameters:
Returns:

Saved, complete Shipment object.

Return type:

shuup.core.models.Shipment

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

form_valid(form)[source]

If the form is valid, save the associated model.

class shuup.admin.modules.orders.views.shipment.ShipmentDeleteView(**kwargs)[source]

Bases: DetailView

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

model

alias of Shipment

context_object_name = 'shipment'
get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_success_url()[source]
get(request, *args, **kwargs)[source]
post(request, *args, **kwargs)[source]
class shuup.admin.modules.orders.views.shipment.ShipmentSetSentView(**kwargs)[source]

Bases: DetailView

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

model

alias of Shipment

context_object_name = 'shipment'
get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_success_url()[source]
get(request, *args, **kwargs)[source]
post(request, *args, **kwargs)[source]
class shuup.admin.modules.orders.views.shipment.ShipmentListView[source]

Bases: PicotableListView

model

alias of Shipment

template_name = 'shuup/admin/orders/shipment_picotable.jinja'
default_columns = [<Column: ID> id, <Column: Order> order, <Column: Content> get_content, <Column: Supplier> supplier, <Column: Tracking Code> tracking_code, <Column: Status> status]
tracking_code_url(instance)[source]
get_supplier(instance)[source]
get_order(instance)[source]
get_content(instance)[source]
create_action_buttons(instance)[source]
__init__()[source]
get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

get_object_abstract(instance, item)[source]

Get the object abstract lines (used for mobile layouts) for this object.

Supported keys in abstract line dicts are:

  • text (required)

  • title

  • class (CSS class name – header for instance)

  • raw (boolean; whether or not the text is raw HTML)

Parameters:
  • instance – The instance.

  • item – The item dict so far. Useful for reusing precalculated values.

Returns:

Iterable of dicts to pass through to the picotable javascript.

Return type:

Iterable[dict]

shuup.admin.modules.orders.views.status module

class shuup.admin.modules.orders.views.status.OrderStatusForm(**kwargs)[source]

Bases: MultiLanguageModelForm

class Meta[source]

Bases: object

model

alias of OrderStatus

exclude = ['default']
__init__(**kwargs)[source]
clean()[source]

Avoid partially translated languages where the translated fields that are required are not set.

save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'allowed_next_statuses': <django.forms.models.ModelMultipleChoiceField object>, 'identifier': <django.forms.fields.CharField object>, 'is_active': <django.forms.fields.BooleanField object>, 'name': <django.forms.fields.CharField object>, 'ordering': <django.forms.fields.IntegerField object>, 'public_name': <django.forms.fields.CharField object>, 'role': <enumfields.forms.EnumChoiceField object>, 'visible_for_customer': <django.forms.fields.BooleanField object>}
declared_fields = {'name': <django.forms.fields.CharField object>, 'public_name': <django.forms.fields.CharField object>}
property media

Return all media required to render the widgets on this form.

class shuup.admin.modules.orders.views.status.OrderStatusEditView(**kwargs)[source]

Bases: CreateOrUpdateView

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

model

alias of OrderStatus

form_class

alias of OrderStatusForm

template_name = 'shuup/admin/orders/status.jinja'
context_object_name = 'status'
class shuup.admin.modules.orders.views.status.OrderStatusListView[source]

Bases: PicotableListView

model

alias of OrderStatus

default_columns = [<Column: Identifier> identifier, <Column: Name> name, <Column: Public Name> public_name, <Column: Role> role, <Column: Default> default, <Column: Allowed Next Status> allowed_next_statuses, <Column: Visible For Customer> visible_for_customer, <Column: Active> is_active]
get_allowed_next_statuses_display(instance)[source]

Module contents

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

Bases: 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 shuup.admin.modules.orders.views.OrderAddressEditView(**kwargs)[source]

Bases: UpdateView

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

context_object_name = 'order'
form_valid(form)[source]

If the form is valid, save the associated model.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

model

alias of Order

template_name = 'shuup/admin/orders/_address_edit.jinja'
class shuup.admin.modules.orders.views.OrderDetailView(**kwargs)[source]

Bases: DetailView

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

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

Insert the single object into the context dict.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_toolbar()[source]
model

alias of Order

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

Bases: 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]

Insert the form into the context dict.

get_customer_data(customer_id)[source]
get_initial_order_data()[source]
get_request_body(request)[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 = 'shuup/admin/orders/create.jinja'
title = 'Create Order'
class shuup.admin.modules.orders.views.OrderListView[source]

Bases: PicotableListView

default_columns = [<Column: Order> identifier, <Column: Order Date> order_date, <Column: Customer> customer, <Column: Status> status, <Column: Payment Status> payment_status, <Column: Shipping Status> shipping_status, <Column: Total, incl. tax> taxful_total_price_value, <Column: Total, excl. tax> taxless_total_price_value]
format_customer_name(instance, *args, **kwargs)[source]
format_order_date(instance, *args, **kwargs)[source]
format_taxful_total_price(instance, *args, **kwargs)[source]
format_taxless_total_price(instance, *args, **kwargs)[source]
get_object_abstract(instance, item)[source]

Get the object abstract lines (used for mobile layouts) for this object.

Supported keys in abstract line dicts are:

  • text (required)

  • title

  • class (CSS class name – header for instance)

  • raw (boolean; whether or not the text is raw HTML)

Parameters:
  • instance – The instance.

  • item – The item dict so far. Useful for reusing precalculated values.

Returns:

Iterable of dicts to pass through to the picotable javascript.

Return type:

Iterable[dict]

get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

get_toolbar()[source]
label(instance, *args, **kwargs)[source]
mass_actions = ['shuup.admin.modules.orders.mass_actions:CancelOrderAction', 'shuup.admin.modules.orders.mass_actions:OrderConfirmationPdfAction', 'shuup.admin.modules.orders.mass_actions:OrderDeliveryPdfAction']
mass_actions_provider_key: str | None = 'order_list_mass_actions_provider'
model

alias of Order

related_objects = [('shop', 'shuup.core.models:Shop'), ('billing_address', 'shuup.core.models:ImmutableAddress'), ('shipping_address', 'shuup.core.models:ImmutableAddress')]
toolbar_buttons_provider_key: str | None = 'order_list_toolbar_provider'
class shuup.admin.modules.orders.views.OrderCreatePaymentView(**kwargs)[source]

Bases: 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]

If the form is invalid, render the invalid form.

form_valid(form)[source]

If the form is valid, save the associated model.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

model

alias of Order

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

Bases: 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]

If the form is valid, save the associated model.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

model

alias of Order

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

Bases: 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]

If the form is valid, save the associated model.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

model

alias of Order

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

Bases: ModifiableViewMixin, UpdateView

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

context_object_name = 'order'
create_shipment(order, product_quantities, shipment)[source]

This function exists so subclasses can implement custom logic without overriding the entire form_valid method.

Parameters:
Returns:

Saved, complete Shipment object.

Return type:

shuup.core.models.Shipment

form_class

alias of ShipmentForm

form_invalid(form)[source]

If the form is invalid, render the invalid form.

form_valid(form)[source]

If the form is valid, save the associated model.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

model

alias of Order

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

Bases: DetailView

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

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

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

model

alias of Order

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

Bases: DetailView

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

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

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

model

alias of Order

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

Bases: CreateOrUpdateView

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

context_object_name = 'status'
form_class

alias of OrderStatusForm

model

alias of OrderStatus

template_name = 'shuup/admin/orders/status.jinja'
class shuup.admin.modules.orders.views.OrderStatusListView[source]

Bases: PicotableListView

default_columns = [<Column: Identifier> identifier, <Column: Name> name, <Column: Public Name> public_name, <Column: Role> role, <Column: Default> default, <Column: Allowed Next Status> allowed_next_statuses, <Column: Visible For Customer> visible_for_customer, <Column: Active> is_active]
get_allowed_next_statuses_display(instance)[source]
model

alias of OrderStatus

class shuup.admin.modules.orders.views.ShipmentDeleteView(**kwargs)[source]

Bases: DetailView

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

context_object_name = 'shipment'
get(request, *args, **kwargs)[source]
get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_success_url()[source]
model

alias of Shipment

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

Bases: View

Update order’s admin comment.

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

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

Bases: BaseDeleteView

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

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

Call the delete() method on the fetched object and then redirect to the success URL.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

model

alias of Order

class shuup.admin.modules.orders.views.ShipmentSetSentView(**kwargs)[source]

Bases: DetailView

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

context_object_name = 'shipment'
get(request, *args, **kwargs)[source]
get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_success_url()[source]
model

alias of Shipment

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

Bases: PicotableListView

__init__()[source]
create_action_buttons(instance)[source]
default_columns = [<Column: ID> id, <Column: Order> order, <Column: Content> get_content, <Column: Supplier> supplier, <Column: Tracking Code> tracking_code, <Column: Status> status]
get_content(instance)[source]
get_object_abstract(instance, item)[source]

Get the object abstract lines (used for mobile layouts) for this object.

Supported keys in abstract line dicts are:

  • text (required)

  • title

  • class (CSS class name – header for instance)

  • raw (boolean; whether or not the text is raw HTML)

Parameters:
  • instance – The instance.

  • item – The item dict so far. Useful for reusing precalculated values.

Returns:

Iterable of dicts to pass through to the picotable javascript.

Return type:

Iterable[dict]

get_order(instance)[source]
get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

get_supplier(instance)[source]
model

alias of Shipment

template_name = 'shuup/admin/orders/shipment_picotable.jinja'
tracking_code_url(instance)[source]